[thelist] "auto-height"

Jesse jesseknoll at gmail.com
Wed Oct 27 14:43:28 CDT 2004


We have a page on our website that has some "funky" borders to it. 
It's made of tables and isn't very "clean".  I am trying to (somewhat
out of the urge to just see if I can do it) set up the borders to
dynamically expand with the content.

Here is my setup:
I want the page to stay at 600px, but the height needs to be dynamic. 
What I cannot figure out is how to make the (rightside) div expand and
contract dynamically with the content.  I've tried clear:both in the
footer, moving things, etc.  Anyone have an idea on how I can get a
div to take it's parent's height?

Thanks,
Jesse

########code#########

html:
<div class="contain">
   <div class="rightside"></div>
   <div class="content">blah blah blah
   </div>
   <div class="footer"></div>
</div>

css file:
.contain
{
width:600px;
height:auto;
}
.content
{
border-left-width:12px;
border-left-style:solid;
border-left-color:#0033FF;
border-top-color:#0033FF;
border-top-width:12px;
borde
r-top-style:solid;
width:583px;
}

.rightside
{
border-left-color:#000000;
border-left-style:solid;
border-left-width:5px;
border-right-color:#CFD6E0;
border-right-style:solid;
border-right-width:5px;
width:0%;
height:600px;
float:right;
}

.footer
{
border-top-color:#6D83AB;
border-top-width:8px;
border-top-style:solid;
border-bottom-color:#000000;
border-bottom-width:2px;
border-bottom-style:solid;
float:left;
height:0%;
width:590px;
}
-- 
Romans 1:18


More information about the thelist mailing list