0

Here're my selectors:

table.table.table-striped.vitalStatisticsTable th,
table.table.table-striped.vitalStatisticsTable td {
  line-height: 1;
  padding: .4rem; 
  background-color: red;
}

Here's my markup:

<table class="table table-striped vitalStatisticsTable">
  <tr>
    <th scope="row">Education</th>
    <td>Post Graduate</td>
  </tr>
  <tr>
  <th scope="row">Vices</th>
    <td>Drinks socially</td>
  </tr>
  <tr>
    <th scope="row">Race</th>
    <td>White</td>
  </tr>
  <tr>
    <th scope="row">Pets</th>
    <td>George the turtle</td>
  </tr>
</table>

My rules are not applied, but I'm not really sure what i'm doing wrong. I thought I had to increase specificity, and as I understand it, I am being more specific than bootstrap, but maybe i'm missing something. Can someone help a css n00b out?

1
  • this is driving me crazy. Commented Mar 24, 2016 at 2:40

2 Answers 2

1

Well. Actually this does work. I had an extra "}" in my CSS file. I'm ashamed and relieved all at the same time.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use this: table.vitalStatisticsTable th, table.vitalStatisticsTable td This will work. All class not need to mention in selector.

1 Comment

I'm afraid that didn't work either. Thanks for the suggestion though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.