Previous Message
Next Message

Re: [css-d] How to replaces tables/frames with CSS?

Sent by Mark Howells on 30 January 2002 08:08

> Concerning the following code, Mark Howells says:  Almost perfect in
> IE5/Mac, except you need to make the total less than
> 100% or the 'main' box drops below the 'left' box (though it still
> floats right). Using values of 20% / 79.9% works ok.
> ----------
> So why not do this:
> #left {
> 	position: relative;
> 	float: left;
> 	width: 20%;
> 	background-color: gray; }
> #main {
> 	position: relative;
> 	float: right;
> 	width: 79.9%; /* IE 5 */
> 	width: 80% /* IE 6 */
> 	background-color: gray; }

This seems to work in IE5/Mac, though I'm not sure why. I was of the 
impression that this browser handled CSS very well and so the second 
width definition should be understood.

Removing the width definition on #main allows a fixed-width 'left' box 
and a dynamic width 'main' box (which expands to fill the remaining 
width of the page).

Only quirk in IE5/Mac is that resizing the browser window to one 
particular width (with my dummy text) causes the 'main' box to drop 
below the 'left' box.

Mark Howells
Previous Message
Next Message

Message thread:

Possibly related: