[thelist] css question...

Jono ox4dboy at comcast.net
Fri Nov 5 09:39:20 CST 2004


Try setting a percentage width for the body and html, and then your 
outer div can have a percentage set for its width, which will be based 
on the total width of its parent - html and/or body.  The inner div 
will also have a percentage width set, which will be a percentage of 
the outer div, which is a percentage of the body/html.  This is 
entirely fluid, but I have not tested this, it is just off the top of 
my head.  Looks good in FF on OS X.

Try this:

<style type="text/css">
html, body {
	width: 99%;    /* I think that IE has issues with 100% */
	margin: 0;
	padding: 0;
#outerDiv {
	width: 40%;    /* 40% of body's 99%  */
	background: red;
#outerDiv .half {
	float: left;
	width: 50%;    /* 50% of 40% of 99% */
	background: silver;
<div id="outerDiv">
<div class="half">&nbsp;</div>

On Nov 4, 2004, at 4:38 PM, Travis wrote:

> hi Jono,
> hey, that seems to work.  unfortunetaely the container also needs to be
> fluid, but maybe I can work something out.  thanks.
> -travis

More information about the thelist mailing list