Last active
August 29, 2015 14:25
-
-
Save probaldhar/249e4f505a6266b9399a to your computer and use it in GitHub Desktop.
CSS3 Attribute Selectors: Substring Matching
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It's an attribute wildcard selector. In the sample you've given, it looks for any child element under .show-grid that has a class that CONTAINS span. | |
So would select the <strong> element in this example: | |
<div class="show-grid"> | |
<strong class="span6">Blah blah</strong> | |
</div> | |
You can also do searches for 'begins with...' | |
div[class^="something"] { } | |
which would work on something like this:- | |
<div class="something-else-class"></div> | |
and 'ends with...' | |
div[class$="something"] { } | |
which would work on | |
<div class="you-are-something"></div> | |
Referance : http://www.impressivewebs.com/css3-attribute-selectors-substring-matching/ | |
http://stackoverflow.com/questions/9836151/what-is-this-css-selector-class-span | |
http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize--net-16048 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment