Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pelsar

macrumors regular
Original poster
Apr 29, 2008
180
0
israel
all i want to do is between paragraphs have some spacing via CSS...yet when i do a return i get a new class

<p class="general_text">

if i do shift return <br> all is well, but that doesnt give me the solution of flexible spacing....which brings me up the next question...what the CSS tag for spacing between paragraphs.

any idea what i 'm doing wrong?

(with tables it was so easy......)
 
You should supply more information, like what application you're using because it sounds like the app is getting in your way. Spacing between paragraphs is a simple thing,
Code:
p {
 margin: 0 0 1em 0;
}
This will create a gap of one line below each paragraph. Margins and padding can be described using 4 numbers like here, which are ordered as: top, right, bottom, and left. The 1em, if you aren't familiar, means 1 line height. You can also using decimal measurements and also pixels (px) values.
 
Code:
p { margin: 0 0 1em 0; }

mnemonic device to help remember: TRouBLe
T for Top, R for Right, B for Bottom, and L for Left.

This also applies for padding, borders and whatever else I am forgetting.
 
The 1em, if you aren't familiar, means 1 line height.

Technically it's the height of the text. You can specify a different line-height for a <p> (like 1.5 em) and if you want that line-height to be the space between your paragraphs you have to specify the margin at 1.5em as well.

To the OP, we definitely need more info, because it sounds like the program you are using is doing something weird. A browser should not be adding in <p>'s for you by itself.
 
thanks guys....and i hate to admit it.

Technically it's the height of the text. You can specify a different line-height for a <p> (like 1.5 em) and if you want that line-height to be the space between your paragraphs you have to specify the margin at 1.5em as well.

To the OP, we definitely need more info, because it sounds like the program you are using is doing something weird. A browser should not be adding in <p>'s for you by itself.

there may be some advantages of the div/shmiv/class stuff over my traditional "table system".

using the "P" for margin spacing (thanks angelwatt for keeping it simple...), that i read above, i added that to the style sheet then, i set up a different text block with a different class, with that new "p" which worked..then copied and pasted those paragraphs into the "problem div" which worked fine and then just changed the text to the proper txt and all is working....(i suppose thats 'cheating' but it did work)

and the program i'm using?...Dreamweaver CS4 (and im keeping the coding window open on my second screen.....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.