•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 455,990 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,762 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3346 | Replies: 4 | Solved
![]() |
•
•
Join Date: Dec 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
just started playing around with CSS and find I have a weird little problem related to printing and hidden divs.
a page contains hidden divs (hidden on screen) - the page uses a print css file so that these divs will be printed when the page prints
there are also links to toggle these divs on/off in the screen display (the links are simple JS setting of the divs' display style)
so far so go - works fine
problem is that, if such div is opened and closed using the links, the (now re-hidden) div will no longer print when the page is printed. They will, of course, print if they are visible on the screen but will not print when hidden by the links.
example: oops - I removed this link because it was to a page on my site which seems against the rules?? yes?
I'm guessing this is related to when stylesheets are applied (as page loads) and I guess I could add a "Print" link or button that would be sure to set the display when printing - but I sort of hate that as a solution??
Any ideas or pointers? Thanks
a page contains hidden divs (hidden on screen) - the page uses a print css file so that these divs will be printed when the page prints
there are also links to toggle these divs on/off in the screen display (the links are simple JS setting of the divs' display style)
so far so go - works fine
problem is that, if such div is opened and closed using the links, the (now re-hidden) div will no longer print when the page is printed. They will, of course, print if they are visible on the screen but will not print when hidden by the links.
example: oops - I removed this link because it was to a page on my site which seems against the rules?? yes?
I'm guessing this is related to when stylesheets are applied (as page loads) and I guess I could add a "Print" link or button that would be sure to set the display when printing - but I sort of hate that as a solution??
Any ideas or pointers? Thanks
Last edited by hav : Dec 6th, 2007 at 3:40 pm.
•
•
Join Date: Jul 2008
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
You can post links to pages showing the problem, or pages showing what you want to do.
You can't post links to attract people to your website.
http://tutorials.mezane.org/tabbed-n...ion-using-css/
It has three DIV and using Javascript two DIV's would be hidden. The final output would be like tabbed window.
I need a print button in the page, and clicking on it should open a new wepage with all the three DIV contents displayed. So that while printing that webpage, will print all the contents of the three tabs.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- printing webpages (JavaScript / DHTML / AJAX)
Other Threads in the HTML and CSS Forum
- Previous Thread: Professional Looking Web Pages
- Next Thread: Content dependant on browser



Linear Mode