vertically center text
I changed an old site from table layout to div layout.
Now i have a div which is 22px high 150 px wide and has a background image and text in it. In the table layout, the text was vertically centered. However in the div layout it is closer to the top. How can i vertically center it?
The easiest way to vertically center text is by giving it a line-height equal to the height of the element you are wanting it centered in.
ah, thank you very much, works!
Most sites i searched for had things like using positioning for IE and display:table-cell and vertical-align: middle for all other browsers, but that didnt work well for just one word