News for hackers. Stuff that matters.
Re:CSS Absolute Centering by yetanotherjosh on Saturday August 10, 2013 @08:10PM (#6193160)
I'm surprised nobody has mentioned the display:inline-block approach to vertical centering. It's a bit awkward for a couple reasons but it is responsive to dynamic content (no fixed dimensions are required), and it does not require tables. It does require a non-semantic (albeit empty) "shim" div. I'm not sure how well it fares in Ye Olde IE 6.0 but hopefully this is not a concern to most webdevs today.

Here's a jsfiddle to illustrate it. http://jsfiddle.net/qu5jq/

There are no comments on this comment yet.