...

View Full Version : need to position a div at the bottom



surreal5335
07-08-2011, 08:59 AM
I am trying to position a div at the bottom inside another div.

I have tried:



.nested_div
{
position: absolute;
bottom: 0px;
}




.nested_div
{
position: relative;
bottom: 0px;
}




.nested_div
{
position: absolute;
bottom: -1px;
}




.nested_div
{
verical-align: bottom;
}


The last one has never worked for me, but thought I would try it.

Any ideas?

Sammy12
07-08-2011, 09:14 AM
<div class="container">
<div class="bottom">
</div>
</div>





.container {
position: relative;
height: 200px;
width: 400px;
}

.container .bottom {
position: absolute;
bottom: 0;
height: 30px;
width: 100%;
}



When you set the containing div to :relative, you can absolute anything within that div or tag in general.
http://css-tricks.com/791-absolute-positioning-inside-relative-positioning/

vertical-align is only for inline elements (a, img, span)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum