-
Making a Div show when Print style sheet is in use
Hi Guys,
As the title suggests, I am wondering if there IS a way of showing a Div (That is of course hidden) when the Print style sheet is in use (Print preview basically).
I've tried so many ways and I can't find out how to do it.
Thanks,
Mark
-
-
Assuming that you already have the two style sheets in place, one for the screen display and another for print, tt's actually quite simple....
In the screen style sheet you need to hide the div in question:
DIV_ID_OR_CLASS { display: none; }
And in the print style sheet, don't hide it:
DIV_ID_OR_CLASS { }
I frequently utilize a .printonly class, which I apply to anything that I only want to display when the site is printed. I hide this class in my screen style sheet, but don't hide it in the print style sheet. I include this as part of my base framework for all sites that I build.
If you need more clarification than this just let me know.
-
The Following User Says Thank You to zip222 For This Useful Post:
-
You, my friend, are a legend!
It actually works when you add 'media="screen" ' to the style sheet link that features the Div's functions.
Thanks again!
Mark
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks