SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    First-letter? Not, all over my document!!

    Hi there to you all,

    As I am quite new to all of this please forgive me for this apparent stupid question.

    I want to only enlarge the first letter of a specific paragraph and have set the p:first letter {.......} style element in my *.css file.

    But now, logically, all text on my page contained in <p> ..</p> is affected and that is not what I wanted.

    How do I let the other paragraphs unaffected?

    Many thanks and best regards.

    Marcel
    The Netherlands

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,555
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    Just give a class to the p that you want to have the style.
    CSS:
    Code:
    p.fl:first-letter {font-size:200%;color:red}
    HTML:
    Code:
    <p class="fl">This is a big first letter</p>
    <p>and this isn't.</p>
    Paul

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    The Netherlands
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many Thanks!!!


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
  •