> To: css-d@lists.css-discuss.org > Subject: [css-d] Is it possible to implement a variable height for a > block box with CSS? > > Hi, All > > Suppose the following markup: > <div class="container"> > <div class="top">...</div> > <div class="bottom">...</div> > </div> > The height of both the container and the top boxes is variable. What I > want > is to make the top edge of the bottom box situated just below the top > box > and the bottom edge of the bottom box situated just above the bottom > edge of > the container box, so the height of the bottom box is also variable. > Can > this be implemented with CSS? If not, is there any other approach?
This is fairly basic CSS box model unless I misunderstand the question. Try this body {background:#fff;margin:0} .container {width:700px;margin:0 auto;background: green} .top {width:500px;margin:10px auto 0;background:red} .bottom {width:500px;margin:0 auto;background:blue} Background colours there for illustration. Cheers Ian IYES SEO Solutions ______________________________________________________________________ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/