04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

understanding inheritance<br />

Sharpen your pencil<br />

310 Chapter 8<br />

Solution<br />

h1, h2 {<br />

font-family: sans-serif;<br />

color: gray;<br />

}<br />

h1 {<br />

}<br />

p {<br />

}<br />

border-bottom: 1px solid black;<br />

font-family: sans-serif;<br />

color: maroon;<br />

Just add a font-family property<br />

to your paragraph rule in the<br />

“lounge.css” file.<br />

I’m wondering if that is<br />

really the best solution. Why are<br />

we specifying the font-family for EACH<br />

element? What if someone added a <br />

to the page - would we have to then add a rule<br />

for that too? Can’t we just tell the whole<br />

page to be sans-serif?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!