html - How to give different content to every td in the table -
i'm struggling giving different content (icons in case) every <td>
using nth-chid()
method.
if i'm adding css rule, see on every <td>
1 type of icon:
.help-block .css-context-explorer-orientation-widget td:before { font-family: icons; content: "\e04f"; position: absolute; }
at stage, want overwrite rule above, see no changes, icons same.
.help-block .css-context-explorer-orientation-widget td:before:nth-child(1) { font-family: icons; content: "\e04e"!important; }
if give !important
rule, shouldn't overwrite rule above?
ps: how overwrite rule when second row?
the problem here not important
.
your selector wrong. :before
should used @ end of selector.
.help-block .css-context-explorer-orientation-widget td:nth-child(1):before {
first select first child element , use before
on it.
Comments
Post a Comment