I'm trying to access the h1 element inside a div with an id of "header".
Should I use
#header h1
or
#header.h1
#header h1
Means "all h1 elements that are descendants of the element with the id "header" (you probably want this one).
#header.h1
Means "the element with the id "header" that also has the class name h1" (you definitely don't want this one).
#header > h1
Means "all h1 elements that are direct children of (i.e., directly underneath) the element with the id "header". This type of selector is not supported by IE6. This one may work but you probably want the first one.
#header h1
if you add point before the meaning is this is a class name
help link :
http://www.w3schools.com/CSS/css_syntax.asp
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With