![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hello, I have tried adding a print stylesheet to a web page I am working on. When I try to print the page it has no styles applied to it at all. This happens in every browser I have tried, on Windows and Linux, and whether the page is loaded locally or on the web. So I must be doing something wrong. In the html the stylesheet link looks like this: link rel="stylesheet" type="text/css" media="print" href="clwm_print.css" title="Printer" / You can view the actual page at: http://www.livingwater.usa.to/test/index.html Can anyone see what I am doing wrong? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
At first glance, you are setting the media type = to print, which means that you have to use the paged media formatting info in your stylesheet. A good reference can be found at http://www.w3.org/TR/REC-CSS2/media.html#media-types and then follow the link to paged_media ( http://www.w3.org/TR/REC-CSS2/page.html ). You could always create a print friendly version of the page, using css, and then have a link to it. (good ref: http://www.ericmeyeroncss.com/projects/06/) I wasn't aware that you had to use special formatting info when using |
#6
| |||
| |||
|
|
In looking at your print style sheet, I don't see any formating. It looks like it's printing the way your style sheet is written. |
|
"wg" <stop (AT) spamming (DOT) me> wrote in message news:cefo37$acs$1 (AT) forums (DOT) macromedia.com... Hello, I have tried adding a print stylesheet to a web page I am working on. When I try to print the page it has no styles applied to it at all. This happens in every browser I have tried, on Windows and Linux, and whether the page is loaded locally or on the web. So I must be doing something wrong. In the html the stylesheet link looks like this: link rel="stylesheet" type="text/css" media="print" href="clwm_print.css" title="Printer" / You can view the actual page at: http://www.livingwater.usa.to/test/index.html Can anyone see what I am doing wrong? |
#7
| |||
| |||
|
|
There isn't a lot of formatting in the stylesheet, but there is some. I mainly just wanted to get rid of the menu, sidebar, and the language links. But even the simple test styling doesn't show up. |
#8
| |||
| |||
|
|
Hello, I have tried adding a print stylesheet to a web page I am working on. When I try to print the page it has no styles applied to it at all. This happens in every browser I have tried, on Windows and Linux, and whether the page is loaded locally or on the web. So I must be doing something wrong. In the html the stylesheet link looks like this: link rel="stylesheet" type="text/css" media="print" href="clwm_print.css" title="Printer" / You can view the actual page at: http://www.livingwater.usa.to/test/index.html Can anyone see what I am doing wrong? |
#9
| |||
| |||
|
|
I think the problem is that you have specified media="screen" on your main style sheet, so you don't get those styles when printing. Change that to media="all" so that you get all of those styles plus the overriding styles in your media="print" style sheet. HTH, Randy There isn't a lot of formatting in the stylesheet, but there is some. I mainly just wanted to get rid of the menu, sidebar, and the language links. But even the simple test styling doesn't show up. |
#10
| |||
| |||
|
|
I did get it to work though by changing the way the screen stylesheet is loaded. I changed the links to the stylesheets from this: link rel="stylesheet" type="text/css" media="screen" href="clwm_screen.css" title="Screen" / link rel="stylesheet" type="text/css" media="print" href="clwm_print.css" title="Printer" / To this: style type="text/css" media="screen">@import "clwm_screen.css";</style link rel="stylesheet" type="text/css" media="print" href="clwm_print.css" title="Printer" / I made this change after looking at the html for alistapart.com's front page. I don't understand why the print stylesheet isn't applied in the first example. If anyone knows why I would love to hear the explanation. Everything I have read so far indicates that the first method should work. Is this a browser bug? |
![]() |
| Thread Tools | |
| Display Modes | |
| |