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

Hans design at softflow.co.uk
Mon May 15 02:54:10 CDT 2006


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                           





More information about the pmwiki-users mailing list