Vertical-align with floated/non-floated text.

liunx

Guest
Aha! I have run into yet another problem. I've always had trouble vertically aligning things the way I wanted to. I've solved my middle alignment by setting the line-height of the text to the height of it's parent element. That works. And by default, things are top aligned, so, again that works. But the real trouble comes when I need something bottom aligned.

Currently, I need a bit of text aligned to the bottom of a 115px tall <div>, also, the text is floated right. I really, really haven't a clue at all how to do this. I have looked at a few things on the W3C, but I have run a-muck and come up empty-handed. Any examples or links would be most appreciated. :)I vaguely solved my problem by using position: absolute; in the piece of text, then position: relative; to the texts parent element, to add ease of positioning. But I would also like to know how I would achieve this using veritical-align.

Cheers - :)
 
Back
Top