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.

Sharpen your pencil<br />

Time to put all this knowledge about floating and positioning to a test!<br />

Take a look at the Web page below. There are four elements <strong>with</strong><br />

an id. Your job is to correctly match each of these elements <strong>with</strong> the<br />

<strong>CSS</strong> rules on the right, and fill in the correct id selector for each one.<br />

Check your answers at the end of the chapter.<br />

div id=“header” div id=“navigation”<br />

div id=“main”<br />

img id=“photo”<br />

p<br />

}<br />

}<br />

}<br />

}<br />

layout and positioning<br />

Fill in the selectors to<br />

complete the <strong>CSS</strong>.<br />

_______________ {<br />

margin-top: 140px;<br />

margin-left: 20px;<br />

width: 500px;<br />

_______________ {<br />

position: absolute;<br />

top: 20px;<br />

left: 550px;<br />

width: 200px;<br />

_______________ {<br />

float: left;<br />

_______________ {<br />

position: absolute;<br />

top: 20px;<br />

left: 20px;<br />

width: 500px;<br />

height: 100px;<br />

you are here 533

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

Saved successfully!

Ooh no, something went wrong!