Fifty years ago today, the United States took a giant leap forward in assuring civil rights for all. On July 2, 1964, President Lyndon B. Johnson signed the Civil Rights Act of 1964. This legislation banned discrimination on the basis of race, religion, gender or national origin, including discrimination in public accommodations (such as hotels, restaurants, gas stations, theaters), as well as in employment and educational opportunities.

Discrimination was a social, political and legal reality in the United States in 1964. That discrimination meant most black Americans were consigned to separate and unequal schools, many in the South could not attend most of their own state’s higher educational institutions (even though they paid taxes for them), and most were unable to achieve social-economic status due to prejudice in employment and promotion. And women were discouraged from educational advancement and denied economic opportunities as well.

Undoubtedly, the Civil Rights Act, subsequent legislation, and the changed culture it created has altered how Americans treat each other. Thanks to much-improved educational and employment opportunities, African-Americans are better off than they were at that time. According to census statistics, the poverty rate for African-Americans today is 27 percent (still 50 percent higher than for whites), while it was 41 percent 50 years ago. Also, a majority of African-Americans today finish high school. Forty years ago, less than 40 percent did.

Women also benefited. In 1960, 34 percent of college degrees were earned by women. Today, that percentage is 59 percent. The wage disparity gap between men and women is narrowing as women are hired for jobs formerly given only to men. In 1960, women’s earnings were 59 percent of those of men. By 2012, the gap had narrowed to 77 percent.

Of course, legislation alone does not change attitudes. Racial and gender bias lived long after the Civil Rights Act of 1964 and still affects our society. I saw it in 1972 in a motel lobby in Georgia when the owner told a black couple that he was sold out when he had just told us a few minutes earlier that there were plenty of rooms available. (He lost our business, too.) I saw it in Provo, Utah, a year later when an Ethiopian BYU student told me he had not been able to get housing because when landlords saw him they claimed the room had been rented in the few minutes between his phone call and his appearance on their doorstep. I heard it more recently when black and Hispanic students in my classes related how some police treated them when they were driving.

Yet, the Civil Rights Act of 1964, and other similar legislation, was necessary because it placed society’s stamp of approval on banning discriminatory practices. It put racial and gender bigots on notice that they could not continue to practice their prejudices in education, employment and commerce without the possibility of legal punishment.

Nevertheless, prejudice continues today. A 2012 poll by the Associated Press found that a slight majority of Americans still held racial prejudices against blacks. This is manifested subtly. A 2012 study by the Department of Housing and Urban Development found that potential homebuyers who were African-American or Asian were shown fewer homes by Realtors than those who were white. Female employees have sued corporations such as Costco and Walmart on claims of persistent gender discrimination. Also, as mentioned earlier, there is still a significant wage gap between men and women.

Moreover, one category not included in 1964 was sexual orientation. Even though major gains have been made in ending discrimination against the LGBT community, there is no national law like the Civil Rights Act of 1964 that bans such discrimination, and most states lack their own specific laws banning discrimination on the basis of sexual orientation.

Today is a day to remember how far the nation has advanced in promoting the civil rights of all. The Civil Rights Acts of 1964 was a major cause. But we also need to realize that, even with the election of an African-American president, the struggle for civil rights is not over. We have a long way to go.

Richard Davis is a professor of political science at Brigham Young University. His opinions do not necessarily reflect those of BYU.