Thread: CSS question

    #1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12

    CSS question


    How do you indent the first line of a paragraph in CSS? It would have to be using an inline command because I already have P declared up top. So it would look something like this:

    <P style = ... </p>

    Help?
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1099
    Code:
    <p style="text-indent:3em">
    It would have to be using an inline command because I already have P declared up top.
    Not necessarily.
    Code:
    <style type="text/css">
    p.indent { text-indent: 3em }
    </style>
    
    <p class="indent">
    This is recommended as it would allow you to change the indentation of all paragraphs with the indent class by just changing the style sheet, which is the whole idea behind them anyway.

    text-indent CSS property.
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2002
    Posts
    421
    Rep Power
    12
    brilliant...as you see I am new to the CSS world. Thank you very much for your help, it is greatly appreciated.
    -andy

IMN logo majestic logo threadwatch logo seochat tools logo