4 replies [Last post]
guischarf
Offline
newbie
Last seen: 15 years 48 weeks ago
Joined: 2004-08-10
Posts: 4
Points: 0

Hi all,

Is there any way to set the space that browsers display between paragraphs tags?

<p> paragraph 1 </p>
space
<p> paragraph 2 </p>

Thanks,

GS

homchz
Offline
Enthusiast
Last seen: 13 years 26 weeks ago
Joined: 2004-07-23
Posts: 77
Points: 0

Space between paragraphs

I always use

<p> paragraph 1 </p><br>
<p> paragraph 2 </p>

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 15 years 49 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

Space between paragraphs

You could set a margin

e.g.

p {
 margin:0 0 10px; /*places 10px space after p */
}

Of course you could set it to whatever value you wish.

obsidian
Offline
Enthusiast
South Carolina
Last seen: 13 years 38 weeks ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

Space between paragraphs

The same idea as above, but you could just add:

p {
padding-bottom: 10px;
}

(or whatever size you wish)

You can't win, you can't lose, you can't break even. You can't even get out of the game!

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 16 weeks 18 hours ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Space between paragraphs

You can also do

p {
margin: 5px 0;
}

This will give a top and bottom margin of 5px and a left and right margin of 0.

Verschwindende wrote:
  • CSS doesn't make pies