Forum Moderators: not2easy
I have a box and within that box I want to align a shorter box to the bottom of the parent box.
Sounds simple to me, but I can't seem to make it happen.
If I shouldn't post code, please feel free to edit, but here is what I have:
#top-nav {
width: 120px;
height: 100px;
float: right;
text-align: left;
font-family : Arial, Helvetica, sans-serif;
font-size : smaller;
color: #ffffff;
}
#client {
width: 120px;
height: 15px;
text-align: center;
font-family : Arial, Helvetica, sans-serif;
font-size : smaller;
color: #ffffff;
background-color: #668099;
top: 85px;
}
The top one is the parent box, the bottom one is the child. I thought that by using the top: attribute I could push it to line up with the bottom of the table, but that's not working. I tried bottom: 0px; but it ignored that one as well.
Any help appreciated!
<div id=green-header>
<div id=top-nav>
Site Map<br>
Contact Us<br>
Quote Request<br>
<div id=client>
Client Login
</div>
</div>
</div>
I should have mentioned it is a child of a child... maybe that is the problem?
Here is the green-header CSS:
#green-header
{
height: 100px;
width: auto;
float: right;
background-color: #669999;
}
Thanks again for your help!
Changes to CSS only shown.
Let me know what you think.
#top-nav {
height: 80px;
float: right;
clear : right;
}
#client {
float:right;
clear : right;
}
and html:
<div id=green-header>
<div id=top-nav>
Site Map<br>
Contact Us<br>
Quote Request<br>
</div>
<div id=client>
Client Login
</div>
</div>
Spook