css- text indent

Discussion in 'CSS' started by Chewysmom, Mar 25, 2009.

  1. #1
    Hello all,
    anyone is familiar with html text indent?
    I know that { text-indent: px; } only works on the first line of a <p> or any block element. But is the way to get a text to continue indenting on all the lines.

    below is what I want my text to display like:

    First Item (First Item with larger font). bla bla bla bla bla bla bla bla
    Wrap and indent​
    bla bla bla bla bla bla bla bla​
    Wrap and indent​

    Second Item (second Item with larger font). bla bla bla bla bla bla bla bla
    Wrap and indent​
    bla bla bla bla bla bla bla bla​
    Wrap and indent​


    Thanks
     
    Chewysmom, Mar 25, 2009 IP
  2. Aatu

    Aatu Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    tried padding?
     
    Aatu, Mar 25, 2009 IP
  3. Chewysmom

    Chewysmom Active Member

    Messages:
    2,082
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    80
    #3
    padding will apply to the beginning of the paragraph as well.
    I need to have the indent or padding applied to all the lines of the paragraph.
    Any idea?
    thanks
     
    Chewysmom, Mar 26, 2009 IP
  4. emed

    emed Peon

    Messages:
    70
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #4
    something like this?
    p {
         padding-left:10px;
         text-indent:-10px;
         }
    Code (markup):
     
    emed, Mar 26, 2009 IP
  5. Chewysmom

    Chewysmom Active Member

    Messages:
    2,082
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    80
    #5
    it works, thank you so much :)
     
    Chewysmom, Mar 26, 2009 IP