Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: What this Asterisk (*) does?

Tags:

css

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?

like image 993
Luis Rivera Avatar asked Jan 22 '12 05:01

Luis Rivera


1 Answers

#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

like image 51
Aziz Avatar answered Sep 21 '22 22:09

Aziz