problem with css media print in IE

A

antoniojc75

I've created two style sheets. One for screen and one for print. The
print css works in both Firefox and Netscape. However when I try to
print in IE7 no style is applied at all. Also the sections of the page
that should be hidden with the <div> tags show up. Here is how I
referenced them on the page:

<style type="text/css" media="screen">@import url(c/screen.css);</
style>
<style type="text/css" media="print">@import url(c/print.css);</style>

To hide certain elements in the print page i use this in the print
style sheet:

..noPrint {
display: none;
}

Please Help!

Thanks!
 
J

John Hosking

Here is how I
referenced them on the page:

<style type="text/css" media="screen">@import url(c/screen.css);</style>
<style type="text/css" media="print">@import url(c/print.css);</style>


When having troubles getting browsers to treat your coding the way you
want or expect, consider the possibility that the browsers might
actually be doing things right, and check the specs:
http://www.w3.org/TR/REC-CSS2/cascade.html#at-import

Notice the quotes in the W3C's version?

(If you actually have the quotes on your real page, it's a confirmation
that you should have provided a URL.)

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top