[pmwiki-users] Clearning Left, when there's a margin-left involved . . .

Ben Wilson dausha at gmail.com
Mon May 15 11:07:41 CDT 2006


Thanks. I got it to work, although for some reason I had to create a
different markup (norleft) and have it trigger before noleft. It
wouldn't let me trump the config. However, for the record I've been
tinkering with the markup behavior of late--so that problem will be
local.

Now PmCal is practically legible. :-)

On 5/15/06, Hans <design at softflow.co.uk> wrote:
> Monday, May 15, 2006, 7:26:55 AM, Ben wrote:
> > Okay, here's something to mull over. I typically use <div> to set up
> > my sidebar and page. Problem is, when I use (:noleft:), all it does is
> > hide the sidebar. Because page has a margin-left, I am unable to
> > capitalize on the missing space. What I would like to do is have
> > (:noleft:) go in and set the page margin-left to '0.'
>
> You can redefine the (:noleft:) directive in your skin's skin.php
> file. For instance:
>
> ## Markup (:noleft:) redefinition
> function NoLeftBar() {
>      global $HTMLStylesFmt, $PageLeftFmt;
>      SetTmplDisplay('PageLeftFmt',0);
>      $HTMLStylesFmt[] = " #main { margin-left:0; width:100%; padding-right:0;}
>           #sidebar { margin-left:-500px;} \n ";
>      return '';
>    }
> Markup('noleft','directives','/\\(:noleft:\\)/e', "NoLeftBar()");
>
>
> Just use the appropriate div names etc in the $HTMLStylesFmt
> declaration to set the left main page margin to zero.
>
>
> Best,
>  Hans
>
>


-- 
Ben Wilson
" Mundus vult decipi, ergo decipiatur"




More information about the pmwiki-users mailing list