Results 1 to 9 of 9

Thread: Html codes for indenting a Whole block text

  1. #1
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink Html codes for indenting a Whole block text

    When indenting text, there are mainly two issues to consider. Either you want to indent the first line of a paragraph, or you wish to do so with an entire block of text.

    Indenting a whole block of text, however, is another matter. But in my case I want it to be indented for I find it neat.

    I'm not really familiar with html codes that's why I seek help from this forum. Can somebody shared a bit of their knowledge of how I can indent it using html codes?

    Thanks in advance!
    I look forward for an answer.
    Last edited by jscheuer1; 04-29-2009 at 08:28 AM. Reason: remove pseudo sig

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Your question is unclear. To indent the first line:

    HTML Code:
    <div style="text-indent: 1em;">
    your text here
    </div>
    to indent an entire block:

    HTML Code:
    <div style="margin-left: 1em;">
    your text here
    </div>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Actually padding-left would indent the block of text, margin-left would move the entire block.
    Eddy Proca
    I love Dropbox. Get it through my girlfriend's referral link (I reached my limit) and both you and her get 500 MB extra! Thanks and you're welcome!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Actually they both do the same thing. However, you are right, padding is more appropriate. It's just a matter of, if there is a border involved, on which side of the border do you want the added space. Padding will place it inside, so is more like what is asked for here. With no border though, I don't think there would be a difference.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot for that great hint. I'd really appreciate it. !

  6. #6
    Join Date
    Apr 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Thanks again !

    Hi,

    This forum is really great. And is active. Thank God that I have found this site.
    Last edited by Snookerman; 06-03-2009 at 07:57 PM. Reason: removed sig

  7. #7
    Join Date
    Jun 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Alternatively, you could use

    HTML Code:
    <blockquote>Whatever you need to indent</blockquote>
    as opposed to include style definitions in your HTML

  8. #8
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,398
    Thanks
    32
    Thanked 153 Times in 147 Posts
    Blog Entries
    35

    Default

    The non-semantic use of the blockquote element purely to indent text is deprecated by the W3C. So its use might give problems in the future.
    ===
    Arie Molendijk.

  9. #9
    Join Date
    Jun 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you, thank you, thank you.
    I'm not completely css illiterate but could I find a simple answer to a simple question on over 20 other help sites???? No.
    In this one little thread lay the answer to my problem.
    Thanks again.

Bookmarks

Posting Permissions

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