[Web4lib] Print style sheet question

Conal Tuohy conal.tuohy at vuw.ac.nz
Thu Apr 19 00:45:28 EDT 2007


Hi Bill

If I were you I'd definitely start by cleaning up and validating the
markup in the document - this should help to get browsers out of "quirks
mode" and will make them behave a little more consistently, at least.

Just quickly, I noticed that you have used "inches" as a unit, which
should be "in" I think. Unlikely to be causing the issue though.

Otherwise, I think there's a problem caused by the linked stylesheets.
In print preview in Firefox I only saw 3 pages! Using the "Web
Developer" plugin, I found that if I disabled the linked CSS then that
problem disappeared, though I still got images broken across
pages :-( Apparently this is often triggered by absolute or fixed
positioning, or floating, but it appears not to be the case with your
page.

Con



On Wed, 2007-04-18 at 20:43 -0400, Drew, Bill wrote:
>  I am trying to get an embedded style sheet for printing to work for
> both FireFox and Internet Explorer.  In Firefox I am running up against
> the problem with long divs.  Is there any solution to it?  My second
> problem is getting both IE and Firefox to avoid inserting page breaks in
> the middle of images.  One page this can be seen on is
> http://library.morrisville.edu/coye/artwork.html.  This page also
> illustrates quite well the long div problem.  The print style works
> quite well for most of the website.  Any help would be greatly
> appreciated.  
> 
> Here is the css for printing:
> 
> <style type="text/css" media="print">
> 
> body {
> 
> background: white;
> 
> font-size: 12pt;
> 
> font-family:Palatino,'Times New Roman',times,serif;
> 
> }
> 
> #menu { display: none; }
> 
> .singlecolumnfooter {display: none;}
> 
> #pickcampus {display: none}
> 
> #headerlinks {display: none}
> #rss {display:none}
> #footertable {display:none}
> #siteidrow {display: none}
> #footercontainer {display:none}
> #libraryinformation {display:none}
> #linkrow {display: none;}
> #showflyout {display:none}
> #copyright {display:none}
> #left {display: none}
> .textboxheader {font-size: 12pt;font-weight: bold;color: black}
> 
> #right {
> 
> width: auto;
> margin: 0 5% 0 .25inches;
> 
> 
> padding: 0;
> 
> border: 0;
> 
> float: none !important;
> 
> color: black;
> 
> background: transparent;
> 
> }
> 
> a:link, a:visited {
> 
> background: transparent;
> 
> font-weight: bold;
> 
> text-decoration: underline;
> 
> }
> 
> #b-navbar {
> 
> visibility: hidden;
> 
> }
> 
> /*Some rules about Page breaks */
> 
> h1, h2, h3, h4, h5, h6 { page-break-after:avoid;
> 
> page-break-inside:avoid }
> href { page-break-inside:avoid; }
> img { page-break-inside:avoid;
> 
> page-break-after:avoid; }
> 
> blockquote, table, pre { page-break-inside:avoid }
> 
> ul, ol, dl { page-break-before:avoid }
> 
> }
> 
> 
> /*]]>*/</style>
>  
> 
> Wilfred (Bill) Drew 
> Associate Librarian, Systems and Reference
> Morrisville State College Library
> E-mail: mailto:drewwe at morrisville.edu
> AOL Instant Messenger: BillDrew4
> http://claimid.com/billdrew
> Facebook me <http://www.facebook.com/p/Bill_Drew/202201900> 
> Bill Drew's Wiki: http://billdrew.pbwiki.com/
> Library: http://library.morrisville.edu/
> SUNYConnect: http://www.sunyconnect.suny.edu/
> My Blog: http://babyboomerlibrarian.blogspot.com
> 
> "They that can give up essential liberty for a little temporary safety
> deserve neither liberty nor safety." Ben Franklin, 1759
> 
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/


More information about the Web4lib mailing list