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.

exercise solutions<br />

Sharpen your pencil<br />

Sharpen your pencil<br />

h1.greentea<br />

p img<br />

a:link<br />

486 Chapter 11<br />

Solution<br />

Your job is to give the “detailed directions” link in the lounge some style. Just like the elixirs<br />

link, we want all unvisited links to be aquamarine, and all visited links to be gray. However,<br />

we don’t want the other links in the lounge to have any hover style... that’s unique to the<br />

elixirs. So, how would you do it? Fill in the blanks to give the “detailed directions” link, and<br />

any other links you might add to the lounge later, this style. Here’s the solution.<br />

Solution<br />

0 1 1<br />

0 0 2<br />

0 1 1<br />

a:link<br />

a:visited<br />

color<br />

color<br />

____________ { __________: #007e7e; }<br />

____________ { __________: #333333; }<br />

Try your hand at caclulating the specificity of these selectors using the<br />

cascade rules. Here’s the solution.<br />

ol li p<br />

.green<br />

#elixirs h1<br />

0 0 3<br />

0 1 0<br />

1 0 1<br />

em<br />

span.cd<br />

#sidebar<br />

0 0 1<br />

0 1 1<br />

1 0 0

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

Saved successfully!

Ooh no, something went wrong!