[pmwiki-users] No <p> between tables with $HTMLVSpace = '';

Lars Eignner surname at larseighner.com
Fri May 17 15:58:54 CDT 2013


On Fri, 17 May 2013, Oliver Betz wrote:

> Hi all,
>
> is anybody using $HTMLVSpace = ''; and knows how to get a <p> between
> two tables separated by empty lines in Wiki markup?
>
> For example, this markup:
>
> || border=1
> || cell 1 || cell 2 ||
> || cell 1 || cell 2 ||
>
>
> || border=1
> || cell 1 || cell 2 ||
> || cell 1 || cell 2 ||
>
> should result in two tables with an empty <p> between.
>
> My workaround is to put a nbsp between the tables, but I would prefer
> if wouldn't need to explain this to the editors.
>


It is not a limitation of the wiki (although there are such things), but of
HTML which does not provide many good options for vertical spacing.

You say you want an empty paragraph between tables.  HTML does not believe
in empty paragraphs.  Without the   various browsers are likely to toss
the empty P out entirely when they make up the page and may toss you into
quirks mode to boot. So stop wanting an empty P.

What you really want, I think, is extra space between tables.  Do that by
styling extra bottom margin for the first table and extra top margin for the
second table.  Examples of how to add styles to tables are given in
PmWiki/Tables. Perhaps:

||border=1 style="margin-bottom: 0.5em;"


Or give your table classes you can manipulate with your style sheet.

All wikis necessarily compromise the logical meaning of the HTML elements.
It is the price that is paid for "simplified" markup.  But when you start
think of things like 'empty paragraph' a little alarm should go off. There
is no context in which an empty paragraph can have a logical meaning, so you
should realize what you are after is appearance, and that should suggest the
answer is in style.

> TIA,
>
> Oliver
>

-- 
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266




More information about the pmwiki-users mailing list