How to override the p::first-letter pseudo element

Discussion in 'CSS' started by snejsnej, Mar 9, 2006.

  1. #1
    Hi,

    I'm using a p::first-letter pseudo element in the template of site I'm developing using Dreamweaver MX 2004.

    It works really well: all the first letters of every paragraph between the <p></p> tags across the whole site can be styled any way I want. The problem: there are some areas where I want to override the p::first-letter rule. How can I do this?

    Thanks!
    Jens
     
    snejsnej, Mar 9, 2006 IP
  2. jrd1mra

    jrd1mra Peon

    Messages:
    243
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    there are a couple of ways, I would give each <p> that I dont want styled a class and then style the <P class="whatever"> in normal paragraph formatting. Or you could use an embedded style on each page that you dont want styled p:first-letter {style:none;} any embedded style will overide external styles, also any class id will override the psuedo element :first letter.
     
    jrd1mra, Mar 9, 2006 IP
  3. snejsnej

    snejsnej Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks, I appreciate your help!
    Jens
     
    snejsnej, Mar 9, 2006 IP