DEV Community

Discussion on: Pure CSS Projects Intro

 
pixmy profile image
Arturo Cabrera

Hello James!

You're right, flexbox should be the new way to center things with CSS, I'm just so used to the "Absolute/Translate" method, it's time for me to update.

Just one thing. The "Absolute/Translate" method works just fine through all modern browsers, is just that you are missing the commas between the "50%" in the translate rule, also you added a width of 50%, go ahead and remove this and the word "Foo" will be just on the center this time.

Thread Thread
 
jamesthomson profile image
James Thomson

Whoops! Good catch. I guess that's the problem working with build systems these days, that rule would have been flagged.