[pmwiki-users] problem with default CSS in a new skin
Patrick R. Michaud
pmichaud at pobox.com
Thu Sep 13 09:51:43 CDT 2007
On Thu, Sep 13, 2007 at 05:33:44PM +0300, blues wrote:
> On Thu, 13 Sep 2007 17:18:48 +0300, Patrick R. Michaud
> <pmichaud at pobox.com> wrote:
> > On Thu, Sep 13, 2007 at 04:35:36PM +0300, blues wrote:
> >> apart from the fact i can't understand why the
> >> "clear:both" is there by default,
> >
> > The "clear:both" is there so that the next revision
> > (if any) will begin any floating elements that may exist
> > in the previous revision.
> >
> > ...er, the next revision (if any) will begin *after* any
> > floating elements that may exist in the previous revision.
> >
> > To see why the clear:both is wanted, take a look at
> > http://www.pmwiki.org/wiki/Test/FloatDiff .
>
> mmm... that makes sense. i gave a look at the test page
> and now it is clear(:both) :).
> but it also breaks my design, because the next revision
> goes down until the end of the SideBar which is in a
> floating div.
> i wonder if there is a way to couple the two things...
> i will have to study it a little more.
It's a very difficult problem, and one of the current limitations
of CSS when dealing with dynamic content -- there's not an easy way
in CSS to say "skip below this floating the content but not this other".
It's one of the reasons that PmWiki's default skin is still a
table-based design.
You might want to take a look at the PmWiki-DivsSkin, which is
a table-less design that also handles the floating components
properly.
Skin:
http://www.pmwiki.org/wiki/Cookbook/PmWiki-DivsSkin
How this skin looks with ?action=diff and floating elements:
http://www.pmwiki.org/wiki/Test/FloatDiff?action=diff&skin=pmwiki-divs
> > Is $HTMLStylesFmt declared as global in the myskin.php file?
>
> no :) i declared it global and it works. thanks!
> i didn't think it needed declaration i thought it works
> like the config.php
Because the skin.php file is loaded from within another
function (the one that handles skin templates), its variables
aren't global by default. It's a limitation of PHP.
Pm
More information about the pmwiki-users
mailing list