Jump to content

Print stylesheet


kurt.santo

Recommended Posts

How would you specify for a print stylesheet, that it should not print certain elements? Lets say I do not want nav bar and any photos other than a logo to be printed. How would I achieve this? Also, if this is possible does this also mean that you could use this style sheet for mobile phone screens etc?Kurt

Link to comment
Share on other sites

You can use the display:none; and visibility:hidden; CSS properties to hide elements (the former collapses the space it would have taken up while the latter just hides it).

Also, if this is possible does this also mean that you could use this style sheet for mobile phone screens etc?
There is a media type for mobiles as well but I can't remember what it is...
Link to comment
Share on other sites

You can specify per media rules with the @media rule. The available types are also listed there. Mobile phones are with the "handheld" group, as well as PDAs and miscellanious handheld devices.

Link to comment
Share on other sites

You can specify per media rules with the @media rule. The available types are also listed there. Mobile phones are with the "handheld" group, as well as PDAs and miscellanious handheld devices.
Cheers, was just able to create my first print style sheet with basic styling. In this context: I have two divs with the footer info. One is used for print and not displayed on screen. The other one is for screen-use and not displayed in printing. If my stylesheets are not available for some reasons (you never know) it prints both divs, which does not make sense as they contain duplicate information...Kurt
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...