p p p paragraphs (Full Version)

All Forums >> [Web Development] >> Cascading Style Sheets



Message


yogaboy -> p p p paragraphs (8/17/2005 18:43:55)

Hello all,

Quick (i hope) quiz for you.

I want to get rid of the carriage-return added on the end of a paragraph by the <p> tags. I've tried using

p {margin: 0;}

or

p {margin-top:0; margin-bottom:0;}

but neither has worked. How do I get rid of the carriage-return???!!!![:@]




womble -> RE: p p p paragraphs (8/17/2005 18:47:53)

Bit late so my brain's not working well (so I can't guarantee it'll work), but try:

p { margin:0px; padding: 0px; }




Spooky -> RE: p p p paragraphs (8/17/2005 21:06:24)

Use <br /> [sm=innocent.gif]




yogaboy -> RE: p p p paragraphs (8/17/2005 23:06:14)

p {margin: 0em 0 0 0;} is what worked in the end. Ta for the help.

Can't use a <br /> cuz then it won't be w3c xhtml compliant, and we do love our compliancy here at Outfront! [:D]




Spooky -> RE: p p p paragraphs (8/17/2005 23:11:44)

<austin powers>Oh behave! [:D]</austin powers>

Im not going to go there [sm=whistling.gif]




womble -> RE: p p p paragraphs (8/18/2005 6:26:34)

quote:

Can't use a <br /> cuz then it won't be w3c xhtml compliant, and we do love our compliancy here at Outfront!


You can use <br /> and be xhtml strict compliant. I use it often and the pages I use it on are compliant.




yogaboy -> RE: p p p paragraphs (8/18/2005 7:03:08)

But all text has to be wrapped in p tags, and I don't want that extra space at the bottom so I can't just finish with a br and hope to get away with it. They're so strict at w3c <austin>Yeah baby, yeah![;)]<austin>

<rant>
Personally I don't see why any tags should add in little "extras", I thought this was against the principles of xhtml, seperating the design from the content. Why should <h3> add a line? Why should <p> add a line? Having to remove these via css is the exact opposite of what w3c say they are doing! In my eyes, p and h are content tags.
</rant>




davidrandall -> RE: p p p paragraphs (8/18/2005 7:33:23)

On your next build, why not try the global white space reset at the beginning of your style sheet:
* {
	padding: 0;
	margin: 0;
}

Then you can add margins, padding etc to only those elements you choose.

Dave




womble -> RE: p p p paragraphs (8/18/2005 7:39:20)

Iain, I agree with your <rant> to a certain extent. Valid xhtml and css should be about trimming out superfluous content that isn't required, but (and I know this isn't the right forum) adding white space between paragraphs aids accessibility. More white space makes it easier to read paragraphs, whether you have visual problems or not.

I recently did a page with a poem on it, and of course I needed a new line every so often, but I didn't want too much space between them. The lines were pretty short and using a closing </p> tag at the end of each line made the whole thing look ridiculous, so I ended up using <br /> at the end of the lines and simply adjusting the space round the whole thing using css. Removing the extras via css is a hassle, yes, but the general principle of having space between paragraphs is a good one.

I may be wrong, but I don't think it's the W3C that add in the space between paragraphs and headings etc., it's the browsers and how they interpret the tags. The poem I mentioned earlier - the biggest hassle was finding a happy medium for the white space around it because of the differences in how FF and IE rendered it, but browser differences is another rant entirely. [;)]




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625