/    Sign up×
Community /Pin to ProfileBookmark

How to configure text indentation

Hi,

I am using the above code to indent text at the beginning of every paragraph:
<P class=MsoBodyText style=”TEXT-INDENT: 36pt; LINE-HEIGHT: 150%”>

This works fine, but I would like to know how I could indent a separate line that could be placed anywhere on the page, not just at the beginning of a paragraph?

Cheers,
Jim

to post a comment
HTML

4 Comments(s)

Copy linkTweet thisAlerts:
@the_treeMay 31.2006 — Interesting question. This springs to mind:&lt;span style="margin-left: 3em;"&gt;[text]&lt;/span&gt;But as you don't know what's going on, on your visitors end, you wont know where the line break is going to come.

I have the feeling that you should consider why it is you want to do this, that often helps you arrive at the awnser.
Copy linkTweet thisAlerts:
@myownslaveauthorMay 31.2006 — I see what you're saying about the line break alright, but that sai, the code you have given me might serve the purpose anyway.

Seeing as line breaks might be an issue, is there not a way of coding the <P> tag so that the whole paragraph is indented automatically? Or would an indented frame/CSS be the only option?
Copy linkTweet thisAlerts:
@the_treeMay 31.2006 — is there not a way of coding the <P> tag so that the whole paragraph is indented automatically?[/QUOTE]The whole paragraph? I suppose this'd do:&lt;p style="padding-left: 2em;"&gt;[...]&lt;/p&gt;But it's often better to be changing the containing element.
Copy linkTweet thisAlerts:
@toicontienMay 31.2006 — In an external or embedded style sheet:
<i>
</i>.indent {
text-indent: 36pt;
}

Then anywhere in your HTML document:
[code=html]
<p class="indent">
<h1 class="indent">
<div class="indent">
<blockquote class="indent">
[/code]

It can only be used on block level elements. Not SPAN, STRONG, EM, B, I, or A.
×

Success!

Help @myownslave spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...