SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: first-letter

Hybrid View

  1. #1
    SitePoint Wizard
    Join Date
    Aug 2002
    Location
    N.Ireland
    Posts
    1,046
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    first-letter

    Does first-letter only work on block elements? Reason I ask is because I want to increase the size of the first letter of a word inside a paragraph.

    .intro:first-letter {
    font-size: 1.4em;
    }
    span:first-letter {
    font-size: 1.4em;
    }

    <p class="intro">This works but <span>this doesn't</span></p>

  2. #2
    SitePoint Zealot itsyM's Avatar
    Join Date
    Jul 2002
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Daz
    Does first-letter only work on block elements?
    "The :first-letter pseudo-element matches parts of block-level elements only."

    http://www.w3.org/TR/REC-CSS2/select...l#first-letter


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •