I think there's something here that I don't understand - though I have done a lot of reading about how CSS works. Fortunately, I have a very simple example below. I have tried this in both Firefox 3.6.12 and IE8 and the behavior is the same.

In the HTML file below, I'm expecting the label on the submit button to be red, 11px text. My reasoning is that even though the 2nd rule is more specific, and therefore would take precedence over the 1st rule, since the 2nd rule doesn't set the color, font-size and font-family attributes, the submit button (an <input> element) should inherit those settings from the 1st rule.

If I move the color, font-size and font-family attributes from the 1st rule to the 2nd rule, the label is, in fact, red and 11px.

(While composing this e-mail, I tried simply removing the 2nd rule below entirely. When I did, the label of the submit button was still not red nor 11px, so I conclude that the more specific 2nd rule isn't responsible for "hiding" the attributes in the 1st rule)

<html>
<head>
        <style type="text/css">
                div.buttonmenu table {
                        background: #BFBFBF;

                        color: red;
                        font-size: 11px;
                        font-family: Arial, Helvetica, sans-serif;
                        }

                div.buttonmenu table input {
                        margin: 0px;
                        padding: 0px 2px 0px 2px;
                        width: 100%;
                        }
        </style>
</head>

<body class="buttonmenu">
        <center>
                <div class="buttonmenu">
                        <table>
                                <tr>
                                        <th>
                                                <form 
action="/help/h-index.htm">
                                                <input value="Help" 
type="submit">
                                                </form>
                                        </th>
                                </tr>
                        </table>
                </div>
        </center>
</body>
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to