Elements in HTML can nest. Inside the body might be a div named content , with a div named newitem nested inside that. Each of these nested elements exists in a parent-child relationship that allows CSS properties to be inherited. The child elements are descendants of the parent elements and inherit properties from them. Descendant elements can be pinpointed precisely to create extremely selective selectors. Take the lowly list item, or li. If you redefine the li tag, you style every list item anywhere in the body. However, if you have div named content , and a li within that, you can write a style for the selector #content li . Instead of styling every li anywhere in the document, it will only style each li inside the content div . Dreamweaver calls contextual selectors like this advanced . There's more about advanced selectors in the "Advanced Terminology" sidebar, later in this chapter. To create an advanced style:
Tips
|