Previous Message
Next Message

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

Sent by RUST Randal 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.

<snip>
>>
>>   #left {
>>     position: relative;
>>     float: left;
>>     width: 20%;
>>     background-color: gray; }
>>
>>   #main {
>>     position: relative;
>>     float: right;
>>     width: 80%;
>>     background-color: red; }
> </snip>

----------  

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; }

I haven't really had the chance to document this, but I *think* that what I
have seen is that IE 5 will not read a second value for a property, so it
will ignore the second "width" value in #main.  IE 6, on the other hand,
will correctly apply the second property, as will NN 6 and Opera 6.

Randal






>> Actually, this will work.  I forgot I had already done this once 
>> before:
>
> <snip>
>>
>>   #left {
>>     position: relative;
>>     float: left;
>>     width: 20%;
>>     background-color: gray; }
>>
>>   #main {
>>     position: relative;
>>     float: right;
>>     width: 80%;
>>     background-color: red; }
> </snip>

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.

Regards
Mark Howells
<http://www.mark.ac/css/>

_______________________________________________
css-discuss mailing list
[EMAIL-REMOVED]
http://two.pairlist.net/mailman/listinfo/css-discuss
Previous Message
Next Message

Message thread:

Possibly related: