Home › Forums › CSS › Body and class works only sticked together › Re: Body and class works only sticked together
November 15, 2012 at 5:43 am
#114405
Member
That presence or lack of a single space between the (body) element and the class selection symbol (.) causes two different selections to occur. No space means the style will apply to elements which are themselves marked with that class navbar.
A single space means the style will apply to elements within the element which themselves are marked with the class.
So, in your case, AS I UNDERSTAND IT
body .node-type-foo
would apply to an element with a class of .node-type-foo if it was INSIDE the body which it isn’t because it’s the whole page.
body.node-type-foo
will work because the class is being applied TO the body.
Is that it?