I have a container div set to 100 by 100 pixels, inside of this div is another div (that has texts) that i wanted it to be at the bottom of the container div. How can i do that?
thanks in advance!
| SitePoint Sponsor |
I have a container div set to 100 by 100 pixels, inside of this div is another div (that has texts) that i wanted it to be at the bottom of the container div. How can i do that?
thanks in advance!
Code CSS:#container { position: relative; } #text { position: absolute; left: 0; bottom: 0; }
You'll want to specify some width and whatnot to make sure the text div works appropriately, but that's the easiest way to do bottom aligned.
Eric Roberts - Racine, WI Web Design & Development
www.cryode.com
cool! it works! thanks!
Anytime. Make sure to double check in some other not-as-friendly browsers (like IE) to make sure it looks good there also.
Eric Roberts - Racine, WI Web Design & Development
www.cryode.com

IE6 fails with that techninque..The best way would be to set (with the inner element with a fixed height of course) position:relative; on the parent, position:abs...nvm I'll put it into code.
Code:#container { position: relative;} #text { position: absolute; left: 0; top:100%;height:50px;margin-top:-25px;}
Twitter-@Ryan_Reese09
http://www.ryanreese.us -Always looking for web design/development work
Bookmarks