How to reduce the space between <p> tags?
Solution 1:
use css :
p { margin:0 }
Try this wonderful plugin http://www.getfirebug.com :)
EDIT: Firebug is now closed as a project, it was migrated to https://www.mozilla.org/en-US/firefox/developer
Solution 2:
As shown above, the problem is the margin preceding the <p>
tag in rendering time.
Not an elegant solution but effective would be to decrease the top margin.
p { margin-top: -20px; }
Solution 3:
The CSS margin
property can be used to affect all paragraphs:
p {
margin: XXXem;
}
Replace XXX
with your desired value; for no space at all use:
p {
margin: 0em;
}
Solution 4:
I have found this to work to give more book style paragraphs:
p.firstpar {
margin-top: 0;
text-indent: 2em;
padding: 0 5px 0 5px;
}
p.nextpar {
margin-top: -1em;
text-indent: 2em;
padding: 0 5px 0 5px;
}
using the em
("M") unit, rather than px
unit, it makes the style independent of the font-size. Padding goes in that order: top, right, bottom, left.