Results 1 to 2 of 2

Thread: Printing elements hidden by JavaScript

  1. #1
    Join Date
    Jan 2006
    Posts
    4

    Printing elements hidden by JavaScript

    I am setting up two stylesheets: one for screen, the other one - for print.

    Everything seems to work just fine, except for one thing.

    I have three hidden DIV's on the page to create a tab-like internal navigation. The content of those DIV's is dynamic, so onLoad of the page and everytime user clicks on one of the tabs, I redraw the height of the parent element (to preserve the page layout) using JavaScript, make the active div visible and the other two hidden.

    Now the problem is, the JavScript overrides my print styles for those divs, so on print the only one that's visible is the active one.

    Obviously I want to print out all the information at once, not just the active div.

    Anyone can think of a workaround for this issue?

  2. #2
    Join Date
    Jan 2006
    Posts
    4
    UPDATE:

    I finally found the way to resolve this: someone recommended the use of !important rule - and it worked! =))

Similar Threads

  1. element specific javascript
    By gumbo in forum Client & Server Side Scripting (PHP, ASP, JavaScript)
    Replies: 0
    Last Post: 04 Dec 2005, 07:25 PM
  2. element specific javascript
    By gumbo in forum Web Design, HTML Reference and CSS
    Replies: 0
    Last Post: 04 Dec 2005, 07:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •