Tutorial 7 - Floating a scaleable drop cap

Step 3 - Float the first letter

When we apply a "float: left" to the first letter we also have to provide a width. The width you use will depend on the width of the letter to be "dropped".

We are using ems to set the width and size of the letter. This will allow the drop cap to scale up or down and always match the user's default font size. An em is approximately the width of a capital "M". Therefore, a capital "L" would only need a width of around .7em.

Go to Step 4 →

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.


CSS CODE
.dropcap
{
float: left;
width: .7em;
}


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