Selectors in action - step by step tutorial

Step 17 - styling the <h2> element

To style the <h2> specifically, a descendant selector is used. It sets the size, weight, color, padding and margin as well as border-bottom.

div#content h2
{
font-size: 2em;
color: #036;
margin: 0;
padding-top: 1em;
font-weight: normal;
}

View step 17 »

Go to Step 18 »

Other Max Design articles and presentations
Associated with webstandardsgroup.org