I just wrote a small CSS that changes a bit the layout of the web2py
book in order to make it more printer-friendly.

I tested it using Stylish Firefox addon, and PDF generated by print to
pdf looks nice.

I'm attaching two versions of the CSS:

web2py_book_stylish.css
  is the one I used with Stylish Firefox addon.
  All the ``!important`` are needed since for some reason Stylish CSS
  don't take the precedence over the "real ones".

web2py_book_print.css
  is the version ready to be included among the other CSS of the site,
  in order to directly allow pretty-printing (if you wish to).

-- 
Samuele ~redShadow~ Santi
----------------------------------------------------------------
     redshadow[at]hackzine.org - redshadowhack[at]gmail.com

  Blog: http://hackzine.org

  GPG Key signature:
       050D 3E9F 6E0B 44CE C008 D1FC 166C 3C7E EB26 4933
----------------------------------------------------------------
/me recommends:
    Squadra Informatica - http://www.squadrainformatica.com
----------------------------------------------------------------
 - Proud ThinkPad T-Series owner
 - Registered Linux-User: #440008
      * GENTOO User since 1199142000 (2008-01-01)
      * former DEBIAN SID user
----------------------------------------------------------------
      "Software is like sex: it's better when it's free!"
                              -- Linus Torvalds

/**
  CSS For printer-friendly version of http://www.web2py.com/book
  This version is to be used with Stylish Firefox addon
**/
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("www.web2py.com") {
    body, #outer, #container {background:transparent !important;}
    #container {border:none !important;}
    #outer {width: 100% !important;}
    #header .quote {display:none;}
    #sidebar{display:none !important;}
    .article{width:100% !important;}
    .credits select {display:none;}
}

/**
  CSS For printer-friendly version of http://www.web2py.com/book
**/
@media print {
    body, #outer, #container {background:transparent;}
    #container {border:none;}
    #outer {width: 100%;}
    #header .quote {display:none;}
    #sidebar {display:none;}
    .article {width:100%;}
    .credits select {display:none;}
}

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to