|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I'm trying to hide some elements when printing a HTML page. I have this "back to top" links that's ineccessary for the printed media. I know that you can do this in css but I haven't figured it out.
|
|
#2
|
|||
|
|||
|
I could be wrong, but I don't think you can do this with just CSS. You could try trapping for the print event in JavaScript (I haven't investigated whether or not the event exists) and tell it to print a version of the page without those links. You could also have a print button on the page that prints a different version (without those links). Another option is making the links white (and the background of the page a color that would contrast well enough with the white. If the links are images, and the viewer doesn't have the browser set to print backgrounds, they won't show up.
|
|
#3
|
|||
|
|||
|
You can do this in ie. Look here for more info on this.
http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/media_1.asp |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > How to hide elements when printing? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|