Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    :first-letter problem

    With the following CSS

    body:first-letter { font-size: 1.5em; }
    p:first-letter { font-size: 1.5em; }

    this

    David Roberts<p>Marshall Drive</p> ............. [1]

    is rendered as expected ie first letters 'D' and 'M' as 1.5em.

    However, if the first 'D' is preceded with <hr> then it loses its 1.5em rendering.

    I have tried a stack of 'trial & error' combos but to no avail.

    [1], with the <hr>, is a simulation of a web site that I have no control over and the CSS is external via Firefox's site specific feature.

    Is is possible to get at that first 'D'?

  • #2
    Senior Coder
    Join Date
    Oct 2005
    Posts
    1,340
    Thanks
    0
    Thanked 61 Times in 60 Posts
    Because the first letter of the body would then be the <hr> So you have to give your 'David' text a seperate id to make this work or put it in its own container.

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that.

    Is either possible given my penultimate paragraph?

  • #4
    New to the CF scene
    Join Date
    May 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    With <hr> preceding David Roberts

    hr + * { color: blue; }

    gives David Roberts and Marshall Drive remains black.

    I should add this is so with Firefox and an external style.

    hr + *:first-letter { font-size: 1.5em; } doesn't work.


  •  

    Posting Permissions

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