Luis Rivera Luis Rivera - 10 days ago 5
CSS Question

CSS: What this Asterisk (*) does?

this line of code is for the navigation bar of Apple.com

#globalheader #globalnav[class*="nosearch"] { width:100%; }


Somebody know what that asterisk after class means there?

Answer
#globalnav[class*="nosearch"]

means: class contains "nosearch"


#globalnav[class^="nosearch"]

means: class starts with "nosearch"


#globalnav[class$="nosearch"]

means: class ends with "nosearch"


Reference: http://reference.sitepoint.com/css/css3attributeselectors