Saturday, February 6, 2010

What's the html code to control distance between paragraghs with 1 div id?

This what I have and the paragraphs are too far apart.


%26lt;div id=';update1text';%26gt;


%26lt;p%26gt;text%26lt;/p%26gt;


%26lt;p%26gt;text %26lt;/p%26gt;


%26lt;p%26gt;text%26lt;/p%26gt;


%26lt;p%26gt;text%26lt;/p%26gt;


%26lt;/div%26gt;








I mean how far apart paragraphs are from eachother vertically. Is this possible to do?What's the html code to control distance between paragraghs with 1 div id?
Place the css style attributes inside the %26lt;p%26gt; tag:





%26lt;p style=';margin-top:4px; margin-bottom:4px;';%26gt;text%26lt;/p%26gt;





if the spacing for all %26lt;p%26gt;'s is the same, then add a style in the header





%26lt;style%26gt;


p {


margin-top:4px;


margin-bottom:4px;


}





and keep your html as above.What's the html code to control distance between paragraghs with 1 div id?
Try using margin properties, like these (You can juse a combination or just one, depending on what you want the first and last paragraph to do):





margin-top: 1em;


margin-bottom: 1em;





Just adjust the sizes until they are small enough to match the spacing you want.
use line-height


ie. line-height:0

No comments:

Post a Comment