Internet Explorer 6 Background Color

I used the code below to split the pages into two halves, 28% and 72%. But the background color set by the wrapper tag should fill 28%; in my case, it works fine in Internet Explorer 7 .

In Internet Explorer 6 , the background color is displayed at 100% of the width instead of 28%.

How to fix it?

My code is:

#wrapper{ 
    float:left; 
    width:28%;
    background:#f5f5dc;  
}

HTML

<div id="wrapper">
    <ul id="testnav">
        <li>  <a href="#">LOCATIONS</a>
            <ul id="subnav">
                <li id="content_1"><a href="#">Note </a></li>
            </ul>
        </li>
    </ul>
</div>
+3
source share
1 answer

This is an ancient Internet Explorer bug, and it only happens if there is both complex CSS and complex HTML . For example, at https://drupal.org/node/129014 this also happened.

: , ( , #wrapper) DOM : 1.

0

Source: https://habr.com/ru/post/1704107/


All Articles