Previous Message
Next Message

Is there a CSS equivalent to valign="bottom" for block level elements?

Sent by Jeremy Amos on 18 March 2005 18:06


On Mar 18, 2005, at 12:31 PM, Steve Clay wrote:

> <div style="position:relative; padding-left:170px; min-height:50px">
>    <!-- your content here -->
>    <img style="position:absolute; bottom:0; left:0" ... />
> </div>
>

I came up with something similar, but rejected it because it doesn't 
keep the text aligned to the bottom of the image when the min-height is 
applied.
The issue is that all the solutions to anchor the text (or image) to 
the bottom of the element by their very nature take them out of the 
document flow, which creates issues when trying to grow the container. 
One could conceivably use server-side or client-side scripting to 
calculate the container height for each affected container, but that's 
not a purely css solution.

I'm also not very convinced of the aesthetic merit of bottom-aligning 
text that exceeds the height of the adjoining object (outside of 
tabular data, and even there it's iffy). But that's outside the purview 
of this list.

J

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: