00783: Bad HTML generation of <p class='vspace'> tags, causing paragraphs misalignments with some skins (notsosimple)

Summary: Bad HTML generation of <p class='vspace'> tags, causing paragraphs misalignments with some skins (notsosimple)
Created: 2006-08-12 19:52
Status: Closed - not a bug
Category: Bug
From: Nicolas
Priority: 3
Version: 2.1.12
OS: all

Description: The HTML generation sometimes produces "<p class='vspace'>", and sometimes only "<p>".

It seems that the first paragraph after a title (<h1>, <h2>, ...) is generated as "<p>", while other are "<p class='vspace'>".

As a result, this may cause misalignments of paragraphs, depending on the skin (and CSS) used.

Particularly with the skin notsosimple : see for exemple http://www.pmwiki.org/wiki/PmWiki/Installation?skin=notsosimple most paragrahs are not left aligned on titles, while some are.

It's not a bug -- PmWiki does this by design. After long discussions on the PmWiki mailing list earlier this year [1] , it was decided that headings would ignore a blank line that follows, such that a paragraph following a heading doesn't get 'vspace' unless there are at least two blank lines ahead of it.

The purpose of this is to allow the vertical space between a heading and its subsequent paragraph to be smaller than the vertical space between paragraphs.

Skin designers should take this behavior into account when creating skins. If an administrator or skin wants to eliminate the "ignore blank line after heading" behavior, it can be done with


in a local customization file or a skin.php.


OK and thanks for the explanation, but the problem pointed out was horizontal alignment.

This means the "bug" is in notsosimple skin ... (unless this is also done by design !)


Oh, I didn't catch that it was a horizontal alignment problem. Sorry about that.

Many people have discovered a number of CSS problems in both SimpleSkin? and NotSoSimpleSkin?, including the fact that tables tend to be forced to 100% width, etc. Those skins really ought to be re-done to be more forgiving about CSS properties.



It's simple to fix the horizontal alignment problem. Open up the notsosimple.css file and find the .vspace code. Change that from .vspace { margin: 4px; } to .vspace { margin-bottom: 4px; }. That should fix the horizontal problem while leaving the gap between paragraphs.

Kyle Mathews