homepage Welcome to WebmasterWorld Guest from 54.227.11.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

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




msg:1175730
 12:57 am on Jul 31, 2002 (gmt 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 [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?

 

tedster




msg:1175731
 4:59 am on Jul 31, 2002 (gmt 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




msg:1175732
 7:02 am on Jul 31, 2002 (gmt 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




msg:1175733
 11:12 am on Jul 31, 2002 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved