Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 200321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:06:05+00:00 2026-05-11T17:06:05+00:00

I have css that works on all tr tags for the table. so in

  • 0

I have css that works on all tr tags for the table.

so in my html I have no styling for tr tag. However, for one TR tag in my table I do not want to apply the TR that is generic to all tables. Is there a way to exclude this TR?

.statisticsTable {
    border:2px solid #990000;
    width:100%;
}
.statisticsTable tr {
    font-weight : bold;
    font-size : 9pt;
    font-family : Arial,Helvetica,sans-serif,Verdana,Geneva;
    color: #ffffff;
    background-color:#990000;

}

<table class="statisticsTable">
   <tr><td colspan="7" class="tableHeaderText">HUB Statistics</td></tr>
   <tr>
      <th colspan="2">HUB</th>
      <th >House Houlds Evaluated</th>
      <th >Total Debt Owed</th>
   </tr>

       <tr  class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
           <td  rowspan=3 valign=top>213-65-6425</td>
           <td >All</td>
           <td >t1</td>
           <td >t2</td>

in above the <tr> that has class of either ‘even’ or ‘odd’ I do not want this <tr> to have .statisticsTable tr properties. is this possible?

Main think I want to avoid is background-color: #990000; and color: #ffffff;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:06:05+00:00Added an answer on May 11, 2026 at 5:06 pm

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have multiple html documents that share one css stylesheet (not multiple page div
I have a logo link that's using a background-image (css sprite). All works fine,
I have some CSS style that does not work in IE and that works
I have some CSS and HTML for horizontal tabs that works perfectly in jsfiddle.
I have some CSS that doesn't behave correctly with IE8. It works fine with
I have a css file that I only want to be visible to Firefox
I have a web project that I am ripping out all the inline styling
I have written code that automatically creates CSS sprites based on the IMG tags
I have a php script that uses some css/javascript tabs, they work on my
I'm writing a webmail product and some emails have body css that changes the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.