1

I have a table implemented using a third party library. There i have something like the below code when inspecting the elements.

<th class="" colspan="3">
   <span class="ant-table-header-column">
      <div>
          <span class="ant-table-column-title">
             GENERAL
          </span>
          <span class="ant-table-column-sorter"></span>
      </div>
   </span>
 </th>



<th class="" colspan="2">
       <span class="ant-table-header-column">
          <div>
              <span class="ant-table-column-title">
                 INFORMATION
              </span>
              <span class="ant-table-column-sorter"></span>
          </div>
       </span>
     </th>

I want to write a css class for th where colspan="3" . The colspan="3" part is the only difference between the code blocks. How do i write a custom class to override the css properties from the library?

1 Answer 1

4

Use an attribute selector:

th[colspan="3"] {
   ...
}
Sign up to request clarification or add additional context in comments.

Comments

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.