Override Default Css For Table
I am making a table on a webpage inside Zetaboards forum software. When I am trying to create alternating background color for each row, the forum's default CSS intervenes. My HT
Solution 1:
Table cells are contained within table rows. When you apply background color to both rows and cells (as is the case with the above example) the cell background color will cover the rows' background color.
Workaround: add this rule to undo the forum's styles applied on table cells:
table.statstd {
background: transparent none;
}
And apply background color on rows (i.e. no change in your original example):
table.statstbodytr:nth-child(even) {
background-color: #333;
}
table.statstbodytr {
background-color: #232;
}
Solution 2:
1.)you have to add td after tr in your css
Try this:
<style>table.statstbodytrtd:nth-child(even) {
background-color: #333!important ;
}
table.statstbodytrtd{
background-color: #232!important ;
}
</style>
Post a Comment for "Override Default Css For Table"