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.

Styling the branding<br />

I hope that despite all the new techniques and selectors, your mind is free from worries. There is one more area of the page<br />

for you to work on, and that’s my favorite part of any site design: the branding.<br />

At this point, you have already worked with all of the techniques and types of selectors that will transform the branding<br />

area’s top-level heading and the extract from Marley’s “Three Little Birds” into attractive and meaningful visual elements.<br />

As these elements will be positioned to create the visual effect of the logo “breaking out of the box,” start by turning the<br />

branding division into a positioning context for these elements.<br />

div[id="branding"] {<br />

position : relative; }<br />

Now you are all set to position the top-level heading and blockquote. Use the Phark image replacement method to replace<br />

the text with a background-image.<br />

h1 {<br />

z-index : 1;<br />

position : absolute;<br />

left : -50px;<br />

top : -30px;<br />

height : 178px;<br />

width : 379px;<br />

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

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

div[id="branding"] blockquote {<br />

z-index : 2;<br />

position : absolute;<br />

left : 225px;<br />

top : 85px;<br />

height : 103px;<br />

width : 198px;<br />

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

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

To ensure that the catchy blockquote always stays in front of its neighboring heading, the blockquote has<br />

been given a higher z-index. For a more detailed explanation of the creative flexibilities of z-index, read my<br />

24ways article at http://24ways.org/advent/zs-not-dead-baby-zs-not-dead.<br />

chapter 4 Designing for Outside the Box<br />

103

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

Saved successfully!

Ooh no, something went wrong!