venkatachalam
venkatachalam

Reputation: 102439

Internet Explorer 6 background-color

I have used the code below to divide 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 visible across 100% of the width instead of 28%.

How do I fix this?

My code:

#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>

Upvotes: 3

Views: 386

Answers (1)

peterh
peterh

Reputation: 1

It is an ancient Internet Explorer bug, and it happens only if there is both of complex CSS and complex HTML. For example, in https://drupal.org/node/129014 it happened, too.

What worked me: I specified background-color on both of the parent and the child (in your case, #wrapper), and both DOM nodes also got a zoom: 1.

Upvotes: 0

Related Questions