04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

using a border instead of an underline<br />

Removing the underline...<br />

Let’s get rid of that confusing underline and instead add<br />

a nice bottom border like we did in the Lounge. To do<br />

that, open your “journal.css” file and make these changes<br />

to the combined “h1, h2” rule:<br />

h1, h2 {<br />

font-weight: normal;<br />

color: #cc6600;<br />

border-bottom: thin dotted #888888;<br />

text-decoration: underline;<br />

}<br />

And here’s how our new “underline” looks.<br />

Definitely more stylish and less confusing<br />

than a text decoration underline.<br />

378 Chapter 9<br />

Now we’ve got borders under the <br />

and element, not underlines.<br />

Notice that borders extend all the way<br />

to the end of the page, rather than<br />

just under the text. Why? You’ll find<br />

out in the next chapter.<br />

Add a border on the bottom of the and<br />

elements. You can almost read this like<br />

English: “add a thin, dotted line <strong>with</strong> the<br />

color #888888 on the bottom border”...<br />

... In the next chapter we are going to go into<br />

borders in detail. Hang on, we’re almost there!<br />

Delete the text decoration.

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

Saved successfully!

Ooh no, something went wrong!