Saturday, December 01, 2007

I am terrible at shrill androgyny

Today's tip comes courtesy of a conversation that I had with Dan, the CSS guru at my company. It's a work around for vertically centering a block level HTML element using CSS.

The trick is to wrap the block level element inside of an inline element. That will allow you to use the vertical-align property to center the inline element, and thus the block level element inside of it.

Is it a hack? Yes. But is it an easier technique than some of the alternative methods that I have seen on the Interweb? Also yes.

0 Comments:

Post a Comment

Previous Posts

Powered by Blogger