I have a template that sets the global properties of the img tag as such:
#content img { background: none repeat scroll 0 0 #FFFFFF; border: 1px solid #CFCFCF; margin-bottom: 2px; padding: 2px; }
I have a list on my page, and one of the elements should have a small transparent image. The above style makes the image get a background and borders that I don't want. Html list:
<div id="land_items"> <ul> <li class="trace_item"> <a href="/imglink"><img src="img/popup.png"></a> </li> </ul> </div>
I tried to override the img tag with the code below, but Firebug continues to display these rules with a strikethrough, indicating that the global img style above takes precedence. I heard it could be because id css styles override class styles. How to do it?
li.trace_item img { background-color: transparent; border: none; padding: 0; margin: 0; }
source share