[WEB4LIB] Re: printing problems with web pages

Ryan Eby ryaneby at gmail.com
Fri Dec 10 14:24:42 EST 2004


Presuming it's a newer browser, you should be able to select the media
type. There are some quirks in some browsers with how it applies
certain media types depending on how the site links to the CSS file. I
know I've had one apply it to the screen anyways, though I don't
remember what version. I have not seen anything on user defined
stylesheets and conformance.

Here's one I found when it's declared on a site:
http://www.codestyle.org/css/media/print-BrowserSummary.shtml

I'm aware of the attempts at standardizing names for classes and id's,
though I haven't seen much come of it (the last audit I saw showed
fairly large differences). I try to stick with the common names
depending on how complex the layout is. The problems I've had in the
past with printing is on certain browsers and sites, depending on how
content is floated or positioned, things can overlap and I'll get text
over text among other problems. I haven't had any real problems though
since I moved to Firefox and Safari. Depending on what browser the
library uses, they would have to figure out what it supports and how
to apply it and test it across the sites in question.

You might also need to use !important statements to override aspects
of the sites in question depending on what they've set up.

On a side note, if it's IE5 or above it might be possible to create a
CSS script so that if anything is set to be a larger width than you
want you can have it make it smaller. It would be an application of
what's described on the site below though using a more general
selector like '*':
http://www.svendtofte.com/code/max_width_in_ie/

If it's not IE then it probably supports max-width. I haven't tested
this though. It might mess up floated elements or more advanced
positioning as well.

Ryan Eby


On Fri, 10 Dec 2004 10:37:45 -0800 (PST), Kevin W Bishop
<bishopk at rpi.edu> wrote:
> 
> 
> 
> -----Original Message-----
> From: web4lib at webjunction.org
> [mailto:web4lib at webjunction.org] On Behalf Of Ryan Eby
> Sent: Friday, December 10, 2004 9:48 AM
> To: Multiple recipients of list
> Subject: [WEB4LIB] Re: printing problems with web pages
> 
> Unfortunately creating a stylesheet that will work across many sites
> to make the printing work right is not easy. Depending on how
> different or complex a site is compared to another you may actually
> make the site worse. Applying a stylesheet using the browser options
> also applies it to the screen media as well. This could probably be
> fixed with a bookmarklet or an extension. This is why I didn't
> recommend it.
> --------------------------
> 
> No, it's not easy.  For this reason and others, there is talk in the
> design community about establishing a basic vocabulary of IDs and
> CLASSes beyond common HTML selectors that pertain to most sites (e.g.,
> "header", "footer", "navbar", etc.); a vocabulary on which we could
> build "bigger and better".
> 
> Re. your second point: could we not in our locally defined style sheet
> specify in our rules "@media print" for generic selectors in order to
> limit those styles to print media?  In other words, although we cannot
> specify print style sheets for a browser, we can specify rules for print
> media within any style sheet.
> 
> For example:
> 
> @media print {
>         body {
>                 margin:  1.7cm 2cm 1.4cm;
>         }
>         h2.chapterTitle {
>                 page-break-before: always;
>         }
> }
> 
> Yes? No?  I've not tested this.
> 
> 
> 
> -kb
> 
> ___________________________
> Kevin W. Bishop > bishopk at rpi.edu
> Communication & Collaboration Technologies
> Rensselaer Polytechnic Institute > http://www.rpi.edu/
>   RPInfo: http://www.rpi.edu/rpinfo/
> 
>



More information about the Web4lib mailing list