Forum Moderators: not2easy
And, no, there wouldn't be any reason to set your paragraphs in table cells unless you are displaying data. You can use margins or padding, depending on how your page is set up.
div.tightp {display:block;}
div.tightp p {margin: .5em 0;}/*1/2 normal spacing*/
###############
<div class="tightp">
<p>The spacing is tight</p>
<p>'Cuz that's how it looks right.</p>
</div>
<p>And now we have default spacing.</p>
More planning, less writing - always works for me. :)
DE
There is no reason at all why you cannot control your paragraphs with margins and/or padding.. but do you really need to? Does it truly add to your design and function.
One example where it IS needed is in the new found trailing paragarph bug present in Opera 7.10 (Opera repeats the trailing default bottom-margin and will break through parent bottom margins.
Here is my own fix:
p.o7 { /* Oprea 7.10 has a paragraph bottom margin bug */
margin-bottom: 0;
padding-bottom: 20px;
}
While the example class "tightp" could be used, I tend to code semantically (sp?) with different tags taking on different characteristics depending on what #id they reside within. So if I have an div #legalese I might have #legalese p {font-size:0.8em, margin:0.5em 0;} to create the "fine-print" section.
As a rule, I dislike creating divs purely to give me certain presentation characteristics. There should be something about the section that makes it a div in its own right and the presentational characteristics flow from that. Am I making sense?
DE