Published #header.callout { } #header .callout { } They look nearly identical, but the top one has no space between "#header" and ".callout" while the bottom one does. This small difference makes a huge difference in what it does. To some of you, that top selector may seem like a mistake, but it's actually a quite useful selector. Let's see the difference, what that top selector means, and exploring more of that style selector. Here is the "plain English" of "#header .callout": Select all elements with the class name callout that are decendents of the element with an ID of header.
Read full article from Multiple Class / ID and Class Selectors | CSS-Tricks
No comments:
Post a Comment