IE7: element showing even with display: none

Posted by dmr on Stack Overflow See other posts from Stack Overflow or by dmr
Published on 2010-05-26T17:48:19Z Indexed on 2010/05/26 17:51 UTC
Read the original article Hit count: 277

Filed under:
|
|

I am trying to hide a "required" message when the page is first shown. On FF and IE8 this works, but for some reason the message shows on IE7.

Here is the HTML:

    <div id="passwordDivRequired" class="requiredMsg">
        <img src="images/required.png" />
                            Required                        
    </div>

And here is the CSS:

.requiredMsg img{
    width: 1.5em;
    height: 1.5em;
    position: relative;
    bottom: -.4em;
}

div .requiredMsg {
    color: #BF5754;
    display: none;
}

© Stack Overflow or respective owner

Related posts about css

Related posts about internet-explorer