Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

Spacing between paragraphs HTML code?

Ads
banner
banner
banner
antony Offline referral

Posts: 478
Joined: Jul 2013
Reputation: 5

#1
Senior Member
How can I control space between paragraphs? I don't want the entire page or text to be affected I just want some of my paragraphs to be closer than the rest of the text! I am talking about vertical spacing not horizontal and I am not talking about spacing between letters or characters!
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#2
Posting Freak
You can use css line-height property.

This will reduce spacing between paragraphs for the entire page!

Code:
body {
    line-height: 0;
}

But if you want only a few paragraphs to be affected the add to each of them either
style="line-height: 0;" or you can use top and bottom margin property!

For the top one!
Code:
<p style="margin-bottom: 50px;">hello</p>

For the bottom one!
Code:
<p style="margin-top: 50px;">hello</p>

Also check this topic space between lines
antony Offline referral

Posts: 478
Joined: Jul 2013
Reputation: 5

#3
Senior Member
Dude thanks very much works great, sorry for such a basic HTML/CSS questions but I am still learning Smile
invisibe_dude Offline referral

Posts: 820
Joined: May 2013
Reputation: 24

#4
Posting Freak
NP I am glad it works and don't worry we are here to help so feel free to ask your CSS or HTML related questions.





User(s) browsing this thread: 1 Guest(s)