From 1877 to 1964, the southern United States consistently voted democratic in every presidential election. What changed?

by xpalms

In almost all of the US presidential elections until the 60s, the southern states voted for the democratic presidential candidate, while the North tended to vote Republican. Now, the trend seems perplexingly reversed, with the GOP having much of its support in the south, and many northern states voting democratic.

How did this change happen? I'm specifically wondering how the platform of the republicans must have changed to align with the beliefs of voters in the south, and vice versa for the democrats.

dhmontgomery