Little CSS-Hack for the annoying <p>

Post custom hacks and enhancements for phpwcms here only. Maybe some of these things will be included in official release later.
Post Reply
pixelpeter
Posts: 45
Joined: Fri 27. Feb 2004, 16:00

Little CSS-Hack for the annoying <p>

Post 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>
cyrano
Posts: 1598
Joined: Sat 31. Jan 2004, 18:33
Location: Stuttgart
Contact:

Post 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.
Gruß/ regards cyrano
--------------------------------------------------------
templates -> http://www.128.weitzelmedia.de
planepix -> http://www.planepix.de
XING -> https://www.xing.com/profile/Thomas_Weitzel3
Peekay
Posts: 286
Joined: Sun 25. Jul 2004, 23:24
Location: UK

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

Post 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.
Post Reply