13.02.2013 Views

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

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.

The markup is as follows. Note that both lists feature an identical number of list items, and that each menu list has a unique<br />

ID (m1 and m2).<br />

<br />

Home<br />

News Archive<br />

Band Diary<br />

Gigs<br />

Downloads<br />

<br />

<br />

Discography<br />

Gallery<br />

Merchandise<br />

Members Area<br />

li>Forums<br />

<br />

We also knew that each menu item might feature unique treatment, so each link has its own unique ID that will come in<br />

handy shortly.<br />

Without CSS, the two lists will appear in their normal flow, one below the other. Therefore, we use margin values to push<br />

and pull each into position. The first (m1) is simply given a left margin of 20px to move it away from the left edge of the<br />

masthead. The second (m2) is moved 130px from the left edge of the masthead, and 160px from its natural position. Therefore,<br />

m2 is moved to the bottom right of the other menu, and then pulled up enough to line up with it, thanks to the large<br />

negative top margin. There is no need for positioning or floats.<br />

#masthead ul#m1 {<br />

margin: 0 0 0 20px;<br />

padding-top:5px;<br />

}<br />

#masthead ul#m2 {<br />

margin:-160px 0 0 130px;<br />

}<br />

chapter 1 Semantic Structure, Dirty Pretty Presentation<br />

15

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

Saved successfully!

Ooh no, something went wrong!