views:

90

answers:

1

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;
}
+6  A: 
div .requiredMsg

Selects any element with a class attribute that contains the word requiredMsg that is a descendant of a div element.

http://penguin.theopalgroup.com/cgi-bin/css3explainer/selectoracle.py

Get rid of the descendant selector (the space).

David Dorward
Thank you, thank you, thank you!!
dmr