You can override its rules in a more specific selector or put its rules in a selector not matching certain tags anymore. But you cannot ignore it as long as its there. Therefore you've to remove the class1 from the class attribute of the tag. You can achieve this with jQuery though.
To apply the same CSS styles to more than 1 HTML elements tags, you can separate various HTML element tags selectors by using the , (comma character) in CSS. This will set the text color of both paragraphs to red . Like this, you can apply one style to many HTML element tag selectors separated by the comma character.
:not(:last-child) The :last-child selector selects the last child. Combining these two above selector to excludes the last children (inner-div) of every parent div from the selection.
CSS cascades, meaning you can overwrite the values of previously defined properties.
You would do:
.statisticsTable tr.even, .statisticsTable tr.odd {
font-weight: normal;
font-size: DEFAULT; /* what ever your default is */
font-family: DEFAULT; /* what ever your default is */
/* I would use the font shorthand property */
color: DEFAULT;
background: DEFAULT;
}
If you want to use CSS3, you can use :not to only apply the following styles to TR elements which don't have the even or odd class:
.statisticsTable tr:not(.even):not(.odd) {
font: bold 9pt Arial,Helvetica,sans-serif,Verdana,Geneva;
color: #fff;
background:#990000;
}
EDIT: not(.even,.odd) is not valid syntax thus will not work (at least not in Chrome)
correct syntax is :not(selector) , however you can do :not(selector1):not(selector2) these not()s are on the same level.
In a browser that supports CSS3 pseudo-selectors (this includes most browsers, notably inluding IE7 and IE88 and not IE6), a selector like .statisticsTable tr:not(.even):not(.odd) for that second rule grouping would do what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With