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.

a:link {<br />

color: #b76666;<br />

text-decoration: none;<br />

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

}<br />

a:visited {<br />

color: #675c47;<br />

text-decoration: none;<br />

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

}<br />

We’re setting the border-bottom<br />

as a shortcut.<br />

Let’s take Starbuzz to the next level<br />

Here’s the goal: to turn Starbuzz Coffee into the site on<br />

the right. To do that, we need to move the Bean Machine<br />

sidebar over to the right so we’ve got a nice two-column<br />

page. Well, you’ve done this once already <strong>with</strong> the lounge,<br />

right? So, based on that, here’s what you need to do:<br />

1<br />

2<br />

3<br />

4<br />

Give the element you’re going to float a unique<br />

name using an id. That’s already done.<br />

Make sure the element’s X<strong>HTML</strong> is just below<br />

the element you want it to float under; in this<br />

case, the Starbuzz header.<br />

Set a width on the element.<br />

Float the element to the left or the right. It looks<br />

like you want to float it right.<br />

Let’s get started. In a few simple steps, we should have the<br />

Starbuzz CEO sending a few Chai Teas over on the house.<br />

layout and positioning<br />

And for the last two rules in the Starbuzz <strong>CSS</strong> we use<br />

the a:link and a:visited pseudo-classes to style the links.<br />

Notice that we’re getting a nice dotted<br />

underline effect on the links by using a<br />

dotted bottom border instead of an<br />

underline. This is a great example of using<br />

the border property on an inline element.<br />

We’ve got a nice two-column look<br />

here, <strong>with</strong> discrete columns.<br />

you are here 503

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

Saved successfully!

Ooh no, something went wrong!