Forum Moderators: not2easy
My clients want a Online Newsletter for their staff, but they also want them to be able to print it off and take it home. Instead of creating two documents I suggested the below solution.
<style type="text/css" media="print">@import url(print.css);</style>
<style type="text/css" media="screen">@import url(test.css);</style>
When I asked the PR people to print out a couple of pages, one from the old site and one with the different media's, they came back and asked what was so different. Both pages printed out the same way. I'm using the company is using a mix of IE6,5.5 and 5. It works fine on 6 but on the others it seems to ignore the media.
I tried to have a look here [codestyle.org] at the compatibility of CSS2 and browsers, but I'm just not picking it up.
Is this a browser version or settings issue?
<link rel="stylesheet" type="text/css" href="test.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />
@media print {
.overideyourStylesHere {
display: none;
}
} /* close @media */
The only problem with any of this really is browser support. AFAIK only IE6 supports it in the IE camp and NS6 Opera 6. No IE5+ support I'm afraid...
Nick