I have a div with float:right (no position property declared). This div has some text content which may be wrapped sometimes. I want the text to always be vertically centered. Declaring display:table-cell and vertical-align:middle for this div does not work at all. Can somebody point me in the right direction about table-cell?
I am using FF. Will this work in IE?
If you declare
display:table-cellthen you have to nest it within elements withdisplay:table-rowanddisplay:table. Just like a real table.Check out Quirks Mode on Tables to see how compatible browsers are.