/    Sign up×
Community /Pin to ProfileBookmark

Paragraph length

Hi guys,

I want to shorten the length between the paragraphs <P> </P>, How can I do that?

Thanx,

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@BonRougeMar 05.2006 — You mean the margin? Try this:

CSSp {
margin:5px 0;
}
Copy linkTweet thisAlerts:
@ba02000authorMar 06.2006 — Thank you man,

I mean when I put <p> </p> around two lines, like follow:

<p>First line</p>

<p>Second line</p>

they will be rendered:

First line

Second Line

I want to decrease the vertical space between them.

Thanx for any help,
Copy linkTweet thisAlerts:
@KeveyMar 06.2006 — Look at it another way (this is the same as Bon Rouge's suggestion):

[CODE]
<html><head><style>
p {
margin-bottom:5px;margin-top:0px;
}</style></head>
<body>
<p>This is a test</p>
<p> this is test 2</p>
</body></html>[/CODE]


Is this what you need? Try adjusting the values for the margin-bottom to see if it does what you want. I couldn't make them appear right next to eachother, but closer together than a normal <p> would be.
Copy linkTweet thisAlerts:
@WebJoelMar 06.2006 — to decrease or increase any 'space' between lines in any text add this to your <p> style,

line-height:15px

or whatever 'height' you want. This reduces/increases the distance between lines(sentences) in paragraphs. If you overdo it though, you'll sacrifice your baseline, meaning that letters with 'tails' like "y" will get cut-off and look more like a "v".... Is this what you mean ?

-Joel
Copy linkTweet thisAlerts:
@ba02000authorMar 06.2006 — thank you guys for your help,,,,,,,,,,
Copy linkTweet thisAlerts:
@NogDogMar 06.2006 — to decrease or increase any 'space' between lines in any text add this to your <p> style,

line-height:15px

or whatever 'height' you want. This reduces/increases the distance between lines(sentences) in paragraphs. If you overdo it though, you'll sacrifice your baseline, meaning that letters with 'tails' like "y" will get cut-off and look more like a "v".... Is this what you mean ?

-Joel[/QUOTE]

Caution: using a fixed amount like "15px" for line-height is generally not a good idea: if the user increases their font size, you risk having lines of text overlap. A better solution is to use a relative value, such as "1.3em".
Copy linkTweet thisAlerts:
@WebJoelMar 07.2006 — Caution: using a fixed amount like "15px" for line-height is generally not a good idea: if the user increases their font size, you risk having lines of text overlap. A better solution is to use a relative value, such as "1.3em".[/QUOTE]

Actually yeah, -I went and looked that up after writing the above, and realized that using "pixels" was not such a good idea for line-height spacing, and for the reason you just stated. ? Mostly I said that ("pixels") to point out that one could 'cut off' the baseline of certain alphabeic characters without giving any thought to user-fontsize problems to further mess things up...

Thanks!
×

Success!

Help @ba02000 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 5.28,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...