13.02.2013 Views

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

WEB STANDARDS CREATIVITY

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

104<br />

The result of this is that your catchy site slogan is transformed into something more attractive, as seen in Figure 4-12.<br />

Figure 4-12. Positioning and z-index combine to create the branding of the site with few worries.<br />

Smile for the accessibility guy<br />

Your work is almost complete, but one important aspect of the WorrySome.net brand is still missing: the yellow smiley face.<br />

If you flick backwards a few pages to look at the markup for this page, you will see that every element and attribute has<br />

been used; nothing has gone to waste. Nothing that is, except the unordered list that holds the handy skip links.<br />

Don’t worry; this element will soon become useful to you. Many web designers and developers choose to hide these embedded<br />

accessibility helpers, often pushing them off-screen and out of view. You are going to use this element to bring the<br />

branding area to life, by attaching the smiley face background-image.<br />

ul[id="nav_access"] {<br />

position : absolute;<br />

top : -33px;<br />

right : -50px;<br />

height : 291px;<br />

width : 340px;<br />

margin : 0;<br />

padding : 0;<br />

background : url(../images/a-access.png) no-repeat;<br />

text-indent : -9999px; }<br />

Preview the branding area in all its smiley glory in your browser, and you will see that the face is not smiling out at you.<br />

There is one important line of CSS missing, along with an important lesson to learn. Unless you specify a z-index value for<br />

any positioned element, those that follow it in the order of the document will always sit on top. The closer to the closing<br />

tag they are, the higher in the stacking order they will be.

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

Saved successfully!

Ooh no, something went wrong!