Forum Moderators: not2easy
I've got some pretty detail oriented writers working with me, and they aren't happy with the space that occurs between a paragraph and an ordered list, for example..
thanks,
p{margin: 5px 20px 5px 20px;}
The order is top-right-bottom-left. Also, there are shorthand methods. If your top/bottom and left/right margins are to be equal, you could shorten it to:
p{margin: 5px 20px;}
If all four margins are to be equal, you may use:
p{margin: 5px;}
By the way, welcome to Webmaster World!
Birdman
<p style="margin-bottom:10px"> text ...</p> As Birdman states you can apply this to all P elements, or you can create a class and wrap all affected Ps inside a DIV containing that CLASS; ie:
CSS Rule:
.10 {margin: 5px 0px} /*this assigns a margin of 5px to both the top and bottom */
<div class="10">
<p>...
<p>...
<p>...
</div>
Wiz
[webmasterworld.com...]
But yes, Wizcrafts is correct about using classes if you don't want ALL the paragraphs to inherit the margin.
There are other clever ways to apply the rules to certain paragraphs without having to add the class="foo" to every p tag.
Suppose you have an article with 15 paragraphs. It's easier(IMO) to just wrap the article in a <div id="article">, and then use this in your stylesheet:
#article p{rules...}
Any paragraphs within that div will have those rules applied to them.
Birdman