开发者

do you hide nav in your print stylesheet?

开发者 https://www.devze.com 2023-01-11 19:22 出处:网络
would you hide the navigation in your print stylesheet? what are pros/cons? my initial thoughts: hide: uses up paper real-es开发者_运维百科tate

would you hide the navigation in your print stylesheet?

what are pros/cons? my initial thoughts:

hide:

keep:

  • keep look and feel of page
  • helps indicate which (sub-) page is being printed

thanks


Personally, I think the pros of hiding navigation far outweigh the cons:

  • uses up paper real-estate
  • not very useful on paper

I think these pros you list are facts, not just opinions. They weigh a lot as such. Now let's look at the cons:

  • keep look and feel of page

Whenever I print something from the Web, more often that not I do it because of the content. In fact, I can't remember a single case of printing something out because of its look and feel. If anything, I'd just take a screenshot.

  • helps indicate which (sub-) page is being printed

Most, if not all, browsers by default include a URL on each printed page. I can later navigate to that URL if I want.


There's no point to having a user print a your design, if they're after that they could print your regular page. Your print page should have the content that they want to print, and an indication of how to find that source on your site. Often I will just include something like My Account > Past Orders > Order # 12345 > Overview and maybe a timestamp at the top, nothing fancy, but if the document is handed off to someone else, they're able to relocate its origin.


In your header:

<link rel="stylesheet" href="print.css" type="text/css" media="print" />

In your print.css file:

#nav {display: none;}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号