Tutorial 7 - Floating a scaleable drop cap

Step 2 - Add a span around the first letter

There are two ways to apply a rule to the first letter. By far the most elegant solution to float a dropcap is to use "first-letter" but as this is not supported in Windows/Internet Explorer5, we will use a less semantically correct option and wrap the first letter in a <span>.

For this tutorial, the class within the span has been named "dropcap" to help illustrate the point, but any name can be used. However, it is better to name classes and id's based on their meaning, rather than their appearance.

Go to Step 3 →

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.


<span class="dropcap">L</span>orem ipsum dolor sit amet, consectetuer...
Other Max Design articles and presentations
Associated with webstandardsgroup.org