I ran into a weird issue, where a CSS rule doesn't seem to be applied correctly on Safari/Chrome/Firefox on Mac.
Given the following html code:
<table id="table" border="1">
<tr>
<td id="cell">
Hello
</td>
</tr>
</table>
Then the following css code works as I expected (as in the cell doesn't have padding on top):
td { padding: 10px; }
#cell { padding-top: 0px; }
But this one doesn't:
#table td { padding: 10px; }
#cell { padding-top: 0px; }
(Try it out online at: http://jsfiddle.net/xkduyk7m/)
I expected both versions of the CSS to yield the same effect in this case, but in the second case the rule that is added later and that applies to the specific cell doesn't override the first rule.
Why?
#cell { padding-top: 0px !important; }!importantunless you have no other way to solve a problem.