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
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts

    p:first-line of a particular div

    Hello All,

    I cant get p:first-line working in my css;
    I want it to work only for a particular div;
    This is what I have:

    html
    Code:
    <div id="text_rgt">
      <p> some text</p>
    </div>
    css
    Code:
    #text_rgt{
    font-family: "Arial Unicode MS", arial, sans-serif;
    font-size: 15px;
    color:#fff;
    width:460px;
    padding-left:440px;
    line-height:1.4;
    margin-top:2px;
    text-align:justify;
    }
    
    #text_rgt p{
    padding-top:7px;
    }
    i tried to add:
    Code:
    #text_rgt p:first-line {text-decoration:underline;}
    but that does not work.. If anybody knows the solution...
    Thanks a lot,

    Mika

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,629
    Thanks
    6
    Thanked 1,002 Times in 975 Posts
    I don’t see any reason why it shouldn’t work. Can you post all your code? maybe something else is overriding it?

  • Users who have thanked VIPStephan for this post:

    mikacruz (05-13-2010)

  • #3
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    You have the foreground and background colors set the same color.

    try here

    Frank

    I have found that the easiest way to check this in the editor , is to drag the cursor in the region where you expect to find the text. It will usually show up because it temporarily alters the foreground colour.
    Last edited by effpeetee; 05-12-2010 at 01:27 PM.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #4
    Regular Coder
    Join Date
    Dec 2007
    Location
    on earth
    Posts
    183
    Thanks
    49
    Thanked 2 Times in 2 Posts
    the problem seems to be from the firefox webdeveloper addon. When I uploaded the css file, it worked...
    Thanks for your replies!


  •  

    Posting Permissions

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