I can get this to work in IE but not FF. The script is supposed to be cross browser friendly.
DD's link:
http://www.dynamicdrive.com/dynamici...printstyle.htm
My page:
http://blockstyle.com/print_command.htm
Any ideas?
I can get this to work in IE but not FF. The script is supposed to be cross browser friendly.
DD's link:
http://www.dynamicdrive.com/dynamici...printstyle.htm
My page:
http://blockstyle.com/print_command.htm
Any ideas?
Last edited by khblock; 05-03-2006 at 08:04 PM.
Originally Posted by khblock
Isn't. Try Google for "media=print". The top result should be the w3c's page on this which, though accurate, can be a bit involved. This Link:
http://www.meyerweb.com/eric/article...ev/200001.html
Looked fairly basic and useful. There are different ways to do this that are mostly cross browser. The method outlined at DD here is IE specific, even though it says otherwise.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thank you for your reply.
Its still doesn't work in FF though. I've searched the net extensively and it seems others are also having this issue as well.
I tried the link you offered and every variation of the tag possible and its just not an option at this time.
I'm now using javascript.
Thank you again and take care.
k
Javascript is unreliable. Many folks have it turned off. This (taken loosely from that link) worked in IE6, FF1.5.0.3 and Opera8.54:
I'm fairly sure the other methods outlined will as well.Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> @media print { BODY {font-size: 20pt; line-height: 120%; background: white;color:black;} } @media screen { BODY {font-size: medium; line-height: 1em; background: silver;color:red} } </style> </head> <body> Yo </body> </html>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Print style sheets do work in a large number of browsers. If you're having problems, then you'll have to post a link to an example. At a guess, there's a specificity issue, but guessing is a waste of time.Originally Posted by khblock
Incidentally, the 'Alternate Document' example you referenced at the start of this thread is due to be removed from DynamicDrive.
Mike
Bookmarks