From the course: EPUB: CSS

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Using classes and IDs with compound selectors

Using classes and IDs with compound selectors - InDesign Tutorial

From the course: EPUB: CSS

Start my 1-month free trial

Using classes and IDs with compound selectors

- In this movie, we're just going to take another look at classes and IDs now that we've covered the most important selectors so we can see how these things can be used, specifically with compound selectors. Let's take a look at some HTML, and, depending on how conversant you are with HTML, you might at first think "I've broken the no spaces rule "in the class name attached to the div on line one", but this attribute is actually referring to two classes, one called smallprint and one named heavy, and here are the rules used in this entire block, just here. So, what happens to the contents of this div? Well, this is where we see some inheritance in action. Remember that unless any rule conflicts otherwise, then all paragraph text inside the div will inherit the properties of the parent. So, the text there will be 14 pixels, bold. You might also notice, if you try this out for real, that the heading size changes slightly, and, if you skip the movie on inheritance, you might want to…

Contents