Incorporating twitter bootstrap tables has been a focus of mine lately, particularly when it comes to custom styling such as setting background colors for table elements.
Here's what I've discovered: by assigning id="foo"
to each <td> element and including #foo { ... }
in my stylesheet, I successfully achieved the desired style.
However, attempts to assign class="foo"
to each <td> element and using .foo { ... }
in my stylesheet were unsuccessful. I also experimented with trying to style using td { ... }
and tr td { ... }
, but those methods didn't work either.
I'm puzzled by this issue. My initial thought was maybe there was another class with the same name causing conflict, but unless there's a mysterious ".asdfasdfasdfasdf" class hiding in bootstrap, that doesn't seem to be the case.