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.

174<br />

My float and margins are intact from the previous example,<br />

my text is negatively indented to another galaxy, and<br />

the values for width and height correspond to the width<br />

and height of my versal graphic. It looks great in all of the<br />

browsers I’m testing, except for Internet Explorer. That<br />

browser has chosen to negatively indent my entire paragraph<br />

instead of just my span, causing the paragraph to<br />

completely disappear (Figure 7-17).<br />

Figure 7-17. Internet Explorer text-indent bug<br />

Luckily, this problem is cleared up by simply declaring the<br />

span to be a block-level element:<br />

.drop {<br />

width: 83px;<br />

height: 83px;<br />

display: block;<br />

float: left;<br />

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

background-image: url(o.gif);<br />

background-repeat: no-repeat;<br />

background-position: top left;<br />

margin-right: .1em;<br />

margin-bottom: .1em;<br />

}<br />

My custom-made drop cap is now in place (Figure 7-18)!<br />

Figure 7-18. My gleaming drop cap

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

Saved successfully!

Ooh no, something went wrong!