CSS: vertical align within divs that won't break IE and is scalable.
December 2, 2004 2:49 PM Subscribe
CSS: vertical align within divs that won't break IE and is scalable. [mi]
posted by cmyr to Computers & Internet (12 answers total)
So I'm not a guru, and I'm hoping I've missed something obvious, but this has been killing me for a few days now. I have a pair of links, and I'm doing css rollovers on link backgrounds... I also have some text in the anchor tags; if the anchors are, say, 100px by 100px, I want the text to display aligned to the anchor's bottom.
I've tried display: table-cell and then vertical-align: bottom, but ie doesn't recognize the former. I have looked at some solutions using a span to display the image, and having it be absolutely positioned, but that feels sloppy, and I'm not convinced it will work well. I could also use static font sizes and static positioning, but then if the user resized the text it would be forced out the bottom of the element. Is there anything I'm missing?