Re: width and height

Rastislav Graus wrote:

> Layout fills 100% of width and 100% of height his content-box:
> +------------------------------------------------+
> | width: 100%; height: 100px;                    |
> +----------------+-------------------------------+
> | width: 300px;  | width: rest;                  |
> | height: rest;  | height: rest;                 |
> |                |                               |
> |                |                               |
> |                |           CONTENT             |
> |                |                               |
> |                |                               |
> |                |                               |
> +----------------+-------------------------------+
> 
> I sugesst to define new value "rest" for atributes width and height with 
> the meaning, that the box of element fills all the remaining space of 
> the content-box.

   This is not necessary because other CSS properties can give a similar 
result.  For example,

#content {
     position: absolute;
     top: 100px; left: 300px;
     bottom: 0; right: 0;
     height: auto; width: auto;
     overflow: scroll;
}

   Although, just like most standards compliant CSS, this doesn't work 
properly in Internet Explorer because IE can't handle setting 'top' and 
'bottom' together, or 'left' and 'right' together.  There may be many 
other methods to acheive a similar result; look up some CSS tutorials, 
many of which also cover hacks for the non-standard browsers.

-- 
Lachlan Hunt

Received on Thursday, 18 March 2004 18:01:54 UTC