[thelist] CSS print stylesheets and dynamic style changes

Stephen Rider evolt_org at striderweb.com
Wed Oct 1 11:06:58 CDT 2003


Here's something to try...

Have each of the Alternate Style Sheets include (or import) the Print 
Style Sheet specifications.

You can use @media to specify the selectors as Print only.

Steve


On Wednesday, October 1, 2003, at 08:21  AM, Francois Jordaan wrote:

> Quick overview: It seems as if dynamic style changes defeat some of the
> advantages of print stylesheets, as something that has been dynamically
> hidden cannot be made visible on hard copy by the print stylesheet.
>
> The Layout
> -----------------
> A single page with 3 divs, A, B & C.
>
> In the style sheet, A is visible (display: block), B & C are hidden
> (display: none;)
> All 3 are set to visible by the stylesheet for print.
>
> On first load of the page you see only div A, and in Print Preview you 
> see
> A, B & C.
>
> The Problem
> -------------------
> We have 3 javascript buttons that are used to show/hide these divs to 
> create
> a tab effect.
>
> The problem is that the javascript which sets all 3 to hidden and then 
> sets
> the div concerned to visible, overrides the print stylesheet.
>
> So once we have clicked to make a different tab visible (and the 
> javascript
> had been run), the only visible div in the Print Preview is the one we
> currently see on screen.
>
> The javascript is using getElementById to target the divs and is using
> 'display:none' and 'display:block' for visibility.
>
> Any ideas how to get the hidden divs to print as well?
>
> francois
>
> _____________________________________________________________________
> This e-mail has been scanned for viruses by MessageLabs.
> -- 
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list