Skip to content

Instantly share code, notes, and snippets.

@silviogutierrez
Created October 6, 2013 21:34
Show Gist options
  • Save silviogutierrez/6859379 to your computer and use it in GitHub Desktop.
Save silviogutierrez/6859379 to your computer and use it in GitHub Desktop.
Your markup:
<div class="item">
<h3 class="product">Foo</h3>
<img src="bar" />
</div>
Your CSS:
.item h3.product { do something to add a product icon here }
Should be:
<div class="item product">
<h3>Foo</h3>
<img src="bar" />
</div>
with CSS:
.item.product h3 { do something to add a product icon here }
.item.product img { do something for images inside product items. can't be done with your markup }
(Technically you could use sibling selectors, but let's not go there)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment