/    Sign up×
Community /Pin to ProfileBookmark

Print Version

Hi,

I want to make a printer friendly version of a web page. I have a page with services provided by a company. Nopoblem yet. Underneath these services I want the companys terms and conditions. So I used external style sheets as so:

[code=php]<link rel=”stylesheet” href=”../styles/basic.css” type=”text/css” media=”screen” />
<link rel=”stylesheet” href=”../styles/basic_print.css” type=”text/css” media=”print” />[/code]

the only real difference is that things like the menu buttons are hidden with a.menu{display:none;} for the print version, and the terms and onditions are hidden in the same way for the screen version.

I know that this is CSS2. What’s going to happen with browsers which don’t support CSS2 but do support display:none;? Is there a chance I’ll accidently hide my menu buttons on an older browser?

Any help much appreciated.

cheers.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@FangMay 06.2003 — If you have hidden elements in the print version, only browsers that understand the media property will use it.

The easiest way is to test your site using different browsers, or ask on a forum. Don't forget to give the address!
Copy linkTweet thisAlerts:
@CharlesMay 06.2003 — [font=georgia]If you are worried about it, flip the links and make sure that [i]basic.css[/i] overrides anything in [i]basic_print.css[/i] that you don't want to see on the screen.[/font]
×

Success!

Help @poab spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...