View Full Version : Printing elements hidden by JavaScript

06 Jan 2006, 05:12 PM
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?

09 Jan 2006, 12:30 PM

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