Hacker News new | ask | show | jobs
by chriscoyier 4694 days ago
using translate() you can center variable width/height stuff too (without the table stuff): http://css-tricks.com/centering-percentage-widthheight-eleme...
1 comments

Wow, that's awesome. As soon as I get to drop IE8 support, I'll think about using that.

I had no idea you could use % within transforms that referred to the size of the element itself (since all other % in CSS refer to the size of a parent element).

Thanks!