Page 1 of 1

Little CSS-Hack for the annoying <p>

Posted: Tue 20. Jul 2004, 12:14
by pixelpeter
If you fill in your text with an WYSiWYG-Editor you'll have noticed, that (if you have more than 1 paragraph) <P>-Tags get inserted. This will screw up (get bigger) the space between ContentHead/ContentSubhead and your article-text.
To avoid this simple put in this additional CSS-definition into your stylesheet:

Code: Select all

.articleText p
{ 
	margin: 0px 0px 10px;
}
This will set the margin to 0px before each paragraph and will produce a little space after each in the article-text. Because it's defined as margin this space won't add to other defined margins preventing from getting big white space all over your page.

I think it's the quicker an better and semantically correct implementation instead of telling the WYSiWYG-editor to use <br><br>

Posted: Tue 20. Jul 2004, 12:19
by cyrano
hi pixelpeter,
this depends lao to my problem, right?
http://www.phpwcms.de/forum/viewtopic.php?t=2845

So i should reset all my changes in the config.default.inc.php to the original file, right?

thanx for advice.

I hope Oliver G. will be able to implement your additions, the pop-up and replacement tag - very usefull.

Thanks for this.

Re: Little CSS-Hack for the annoying <p>

Posted: Wed 13. Oct 2004, 21:29
by Peekay
pixelpeter wrote:This will set the margin to 0px before each paragraph and will produce a little space after each in the article-text.
This is SO cool! :D Many thanks for this tip Pixelpeter, I had no idea you could achieve this typographical effect with CSS.