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.
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.
