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.

more absolute positioning<br />

528 Chapter 12<br />

Holy beans! Starbuzz just won<br />

the Roaster of the Year Award.<br />

This is huge. Can we get it on the<br />

page front and center? All our<br />

customers need to see this. Top<br />

priority, make it happen!<br />

The award.<br />

Well, we could just throw this as an image into any old<br />

paragraph on the page, but the CEO really wants this to be<br />

noticeable on the page. What if we could place the award<br />

on the page like this?<br />

Not only does that look great,<br />

but it’s exactly what the<br />

CEO wants. But how? Well,<br />

you know all about absolute<br />

positioning now, so why not<br />

position the image on the<br />

page using that? After all, by<br />

using absolute positioning<br />

you can place it anywhere on<br />

the page you want, and since<br />

it isn’t in the flow it won’t<br />

affect any other element on<br />

the page. Seems like an easy<br />

addition to make to the page<br />

<strong>with</strong>out disrupting what’s<br />

already there.<br />

Let’s give it a try. Start by<br />

adding a new , just<br />

below the header (the CEO<br />

thinks this is pretty important, so it should be up high in the<br />

order of content). Here’s the <br />

<br />

<br />

<br />

The <br />

contains the<br />

image of the<br />

award.

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

Saved successfully!

Ooh no, something went wrong!