Log in

View Full Version : Html codes for indenting a Whole block text



rowenavic
04-29-2009, 07:16 AM
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.

jscheuer1
04-29-2009, 07:31 AM
Your question is unclear. To indent the first line:


<div style="text-indent: 1em;">
your text here
</div>

to indent an entire block:


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

Snookerman
04-29-2009, 07:41 AM
Actually padding-left would indent the block of text, margin-left would move the entire block.

jscheuer1
04-29-2009, 07:58 AM
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.

rowenavic
05-26-2009, 05:22 AM
Thanks a lot for that great hint. I'd really appreciate it. !

rowenavic
05-26-2009, 05:25 AM
Hi,

This forum is really great. And is active. Thank God that I have found this site.

mandrig
06-03-2009, 05:35 PM
Alternatively, you could use


<blockquote>Whatever you need to indent</blockquote>

as opposed to include style definitions in your HTML

molendijk
06-04-2009, 06:06 PM
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.

perkele
06-26-2009, 05:34 PM
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.