01160: Frames (wikistyle) show incorrectly because of use of <span> tags instead of <div>
The problem is browser-specific and is demonstrated in this test page: http://www.pmwiki.org/wiki/Test/FrameWikistyle
The use of <span> tag instead of <div> tags for creating floating frames (in wikistyles.php) displays them incorrectly in some browsers (like Google Chrome).
A frame created by a wikistyle puts the contents inside a floating <span> block. The issue arises if the content contains a <div> block inside it. Technically it is illegal to create a <div> (a block element) inside a <span> (an inline element). While IE and Firefox fixes this issue, Chrome does not.
- Create a "div" tag instead of a "span" tag in wikistyles.php - replace "span" with "div style='display:inline;'" (line 95 of wikistyles.php as of PmWiki v 2.2.8).
- In config.php add the line $spanTag = 'div style="display:inline;"';
Hello. The convention is to use %style% for inline regions with span, and >>style<< for div blocks. So if you used:
>>rframe<< (:pagelist:) >><<
%rframe%(:pagelist:), it should show correctly in Chrome, but it would also validate as correct HTML -- because what the latter isn't. --Petko January 02, 2010, at 03:55 AM
Thanks Petko. I wasn't aware of that.. new to PmWiki. :) You can remove this issue page if you want. Subhrajit January 02, 2010, at 05:52 AM