* Formatting Tip: Big First Letter
Posted on August 2nd, 2011 by John. Filed under Formatting Tips.
A common embellishment used in print books is to have the first letter of the first paragraph in a chapter appear much larger then the others. In addition to the letter being larger than the rest it also falls below the baseline. The rest of the paragraph will wrap around this first letter.
To achieve this we will use a little bit of CSS and a span tag. Surround the letter with a span tag and set it to use the class “bfl”.
<p><span class="bfl">L</span>orem...</p>
Add the following class to your CSS file linked by the document.
span.bfl { font-size: 450%; font-weight: bold; float: left; margin-top: -10px; margin-bottom: -15px; }
The best way to illustrate this concept is with an example. Download ft-big-first-letter.epub. Opening the file with Sigil you will see the example chapters and the external CSS that is referenced by each XHTML file.
Tags
Archives
- April 2012 (1)
- March 2012 (1)
- February 2012 (3)
- January 2012 (3)
- December 2011 (2)
- November 2011 (1)
- October 2011 (3)
- September 2011 (9)
- August 2011 (15)
- July 2011 (5)
- June 2011 (3)
- May 2011 (4)
- April 2011 (2)
- March 2011 (2)
- February 2011 (4)
- January 2011 (4)
- December 2010 (2)
- November 2010 (1)
- October 2010 (1)
- August 2010 (3)
- July 2010 (4)
- June 2010 (1)
- May 2010 (2)
- March 2010 (1)
- January 2010 (8)
- December 2009 (5)
- November 2009 (6)
- October 2009 (4)
- September 2009 (2)
- August 2009 (6)
- July 2009 (6)
- June 2009 (4)
- May 2009 (6)
- April 2009 (4)
- March 2009 (2)
- February 2009 (4)
- January 2009 (4)
- December 2008 (7)
- November 2008 (2)