http://www.webmasterworld.com Welcome to WebmasterWorld Guest from 38.103.63.17
register, login, search, glossary, subscribe, help, library, PubCon, announcements , recent posts, unanswered posts
Subscribe to WebmasterWorld
Home / Forums Index / Browser Side World / CSS
Forum Library : Charter : Moderators: DrDoc & Robin reala & SuzyUK

CSS

  
CSS Media="print"
Not working on IE 5.5
justa


#:1175730
 12:57 am on July 31, 2002 (utc 0)

I've just started converting my site's over to XHTML compliance, but I've run into a problem.

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 at the compatibility of CSS2 and browsers, but I'm just not picking it up.

Is this a browser version or settings issue?

tedster


#:1175731
 4:59 am on July 31, 2002 (utc 0)

I think I remember hearing that support for @import PLUS @media was still dicey on IE 5 and 5.5. Instead of using <style> tags and @import, does it help to use <link /> instead?

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

Nick_W


#:1175732
 7:02 am on July 31, 2002 (utc 0)

Your best bet may be to put the print stuff in your main styles....

@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

justa


#:1175733
 11:12 am on July 31, 2002 (utc 0)

I have replaced the previous with <link rel="stylesheet" type="text/css" href="test.css" media="screen" />
<link rel="stylesheet" type="text/css" href="print.css" media="print" />

It still works fine when I print, I'll be back tomorrow if it's still buggy on others. Cheers for the help.

 

Home / Forums Index / Browser Side World / CSS
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of WebmasterWorld Inc.
© WebmasterWorld Inc. / SearchEngineWorld 1996-2008 all rights reserved