tags?
I have a page that I\'m converting to PDF. This page contains a number of paragraphs and they don\'t all fit onto a single page. If I could reduce the spacing between the
Replace <p> </p>
with
Add as many
as needed.
I solved the same problem by this. Just sharing it.
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
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.
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; }
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;
}
Reduce space between paragraphs. If you are using blogger, you'd go to template, 'customize' then find 'add css' and paste this: p {margin:.7em 0 .7em 0} /*Reduces space between
from full line to approx. 1/2 line */ If you are just tagging your webpage, that's still what you would use, just put it into your css file(s).
I was an sgml template designer in the late 70s/early 80s and all this tagging is just a dtd within sgml (even if they are now trying to say that html5/css3 is 'not', YES IT STILL IS.) :)
You can find all this basic info at w3schools too you know. Really if you are learning how to do layout using tagging or even javascript, etc. you should start with w3schools. Some people say it is 'not always' right, but folks, I've been in IT since 1960 (age 12) and w3schools is best for beginners. Are some things wrong there? Ah, I dunno, I haven't found any mistake, although sometimes if you are a beginner you might need to read two viewpoints to truly grasp the sense of something. But do remember that you are NOT programming when you code a webpage, you are simply doing layout work. (Yell all you want folks, that's the truth of it.)