Previous Message
Next Message

Vertical alignment of text within div

Sent by Roger Johansson on 21 June 2004 20:08


On 21 jun 2004, at 20.53, Jon Jensen wrote:
>
> If you want to align text at the bottom of a div, the best way is to  
> make
> the div "position:relative;", and then put the text in a container (p  
> or div
> or whatever) inside the aforementioned div and make it  
> "position:absolute;
> bottom:0;"

You could also use display:table-cell and vertical-align:middle to make  
all browsers that support it (all except IE) to make them vertically  
align the text, and let IE display the text normally (top aligned) I've  
experimented a bit with this:
<  
http://www.456bereastreet.com/archive/200406/ 
equal_height_boxes_with_css_part_ii/ >

/Roger

--
http://www.456bereastreet.com/

______________________________________________________________________
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:

Possibly related: