By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,156 Members | 1,004 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,156 IT Pros & Developers. It's quick & easy.

confused re media="print" / printing pages?

P: n/a
Hello,

I am trying to have

1. web pages in large font
2. web pages with smaller font for printing

I am using

<link rel="stylesheet" media="print" type="text/css"
href="assets/style/print.css">

but although the text goes right across the browser (IE 6) screen and
the font size is smaller than the that on the normal screen, the print
out is still the same size as if it were the larger font ??!!

Where am I going wrong?

Cheers

Geoff
Jul 20 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
Geoff Cox wrote:
<link rel="stylesheet" media="print" type="text/css"
href="assets/style/print.css">

but although the text goes right across the browser (IE 6) screen and
the font size is smaller than the that on the normal screen, the print
out is still the same size as if it were the larger font ??!!

Have you got a link we can see?

One guess - make sure that your print stylesheet appears below the normal
stylesheet in the code, otherwise your print font sizes will be changed to
reflect those in the standard stylesheet. The media bit says (in effect)
'These bits are for printed output only', and leaving it out says (in
effect) 'These bits apply to everything' - which would override settings
made specifically for print.

Regards,

Pete.
Jul 20 '05 #2

P: n/a
On Wed, 24 Dec 2003 10:01:21 -0000, "Peter Connolly"
<no*************@nospamrequired.com> wrote:
One guess - make sure that your print stylesheet appears below the normal
stylesheet in the code, otherwise your print font sizes will be changed to
reflect those in the standard stylesheet. The media bit says (in effect)
'These bits are for printed output only', and leaving it out says (in
effect) 'These bits apply to everything' - which would override settings
made specifically for print.
Peter,

Thanks for that info, I didn't know that. By the way do you have any
good sources of info re using css to create 3 columns on a page?

All seems well now. There must have been a problem in my original
print.css file since when I restricted it to defining paras and
headers, the printing is OK !

Cheers

Geoff


Regards,

Pete.


Jul 20 '05 #3

P: n/a
"Geoff Cox" <ge*******@dontspamblueyonder.co.uk> wrote in message
news:tc********************************@4ax.com...
On Wed, 24 Dec 2003 10:01:21 -0000, "Peter Connolly"
<no*************@nospamrequired.com> wrote:
Thanks for that info, I didn't know that. By the way do you have any
good sources of info re using css to create 3 columns on a page?


http://bluerobot.com/web/layouts/

Cheers!
Peter Foti
Jul 20 '05 #4

P: n/a
On Wed, 24 Dec 2003 10:47:21 -0500, "Peter Foti"
<pe****@systolicNOSPAMnetworks.com> wrote:
"Geoff Cox" <ge*******@dontspamblueyonder.co.uk> wrote in message
news:tc********************************@4ax.com.. .
On Wed, 24 Dec 2003 10:01:21 -0000, "Peter Connolly"
<no*************@nospamrequired.com> wrote:
Thanks for that info, I didn't know that. By the way do you have any
good sources of info re using css to create 3 columns on a page?
http://bluerobot.com/web/layouts/


Peter - thanks for the link! Any idea whcih versions of Netscape and
IE work with this?

Cheers

Geoff

Cheers!
Peter Foti


Jul 20 '05 #5

P: n/a
"Geoff Cox" <ge*******@dontspamblueyonder.co.uk> wrote in message
news:c5********************************@4ax.com...
On Wed, 24 Dec 2003 10:47:21 -0500, "Peter Foti"
<pe****@systolicNOSPAMnetworks.com> wrote:
"Geoff Cox" <ge*******@dontspamblueyonder.co.uk> wrote in message
news:tc********************************@4ax.com.. .
On Wed, 24 Dec 2003 10:01:21 -0000, "Peter Connolly"
<no*************@nospamrequired.com> wrote:
Thanks for that info, I didn't know that. By the way do you have any
good sources of info re using css to create 3 columns on a page?


http://bluerobot.com/web/layouts/


Peter - thanks for the link! Any idea whcih versions of Netscape and
IE work with this?


I'm not sure, though on the 3 column page it lists that the layout fails in
IE4.5/Mac, so I would assume they have tested this on many browsers. Note
that with Netscape 4.0, the page seems to degrade gracefully. That is,
while there is not a 3 column layout, the content is still presented in a
logical format that is accessible. I'm not sure what other browsers will
look like.

Regards,
Peter
Jul 20 '05 #6

P: n/a
On Fri, 26 Dec 2003 10:34:43 -0500, "Peter Foti"
<pe****@systolicNOSPAMnetworks.com> wrote:
Peter - thanks for the link! Any idea whcih versions of Netscape and
IE work with this?


I'm not sure, though on the 3 column page it lists that the layout fails in
IE4.5/Mac, so I would assume they have tested this on many browsers. Note
that with Netscape 4.0, the page seems to degrade gracefully. That is,
while there is not a 3 column layout, the content is still presented in a
logical format that is accessible. I'm not sure what other browsers will
look like.


Peter,

thanks - I may have to stay with tables. I'm having to be very careful
as a reviewer had javascript problems so had to remove the javascript!
I think perhaps very cautious library network people had disabled
scripting in their browsers. This likely?

Cheers

Geoff
Jul 20 '05 #7

P: n/a
Geoff Cox wrote:

I think perhaps very cautious library network people had disabled
scripting in their browsers. This likely?


yep - highly likely

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #8

P: n/a
On Sat, 27 Dec 2003 16:15:06 -0000, "William Tasso"
<ne****@tbdata.com> wrote:
Geoff Cox wrote:

I think perhaps very cautious library network people had disabled
scripting in their browsers. This likely?


yep - highly likely


William

I've just had a look at your web site - I do like the "clean,
uncluttered" look to it .. do you have any recommendations re good
info on css?

Cheers

Geoff

Jul 20 '05 #9

P: n/a
Geoff Cox wrote:
On Sat, 27 Dec 2003 16:15:06 -0000, "William Tasso"
<ne****@tbdata.com> wrote:
Geoff Cox wrote:

I think perhaps very cautious library network people had disabled
scripting in their browsers. This likely?
yep - highly likely


William

I've just had a look at your web site - I do like the "clean,
uncluttered" look to it ..


/speechless.

It's probably not in a good shape at the minute. I think there are several
pages which don't validate.
do you have any recommendations re good
info on css?


this group - c.i.w.a.html
its sister - c.i.w.a.stylesheets
news:alt.html
news:alt.html.critique
news:alt.www.webmaster

There's a list of web sites here:
http://groups.google.com/groups?selm...ws.prodigy.com

and the home sites of many regulars - it would be unjust to single out any
particular one, I have learned much from lurking and researching - still
learning.

Start with the content - know what every page is for. Then the navigation
if applicable.

Keep the markup simple - no, make that very simple.

Learn to live with the fact that not all browsers were created equal.

Accept that 'trying to be clever' will appear as exactly that.

In any event, have fun.
--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #10

P: n/a
Peter Connolly wrote:
One guess - make sure that your print stylesheet appears below the normal
stylesheet in the code, otherwise your print font sizes will be changed to
reflect those in the standard stylesheet. The media bit says (in effect)
'These bits are for printed output only', and leaving it out says (in
effect) 'These bits apply to everything' - which would override settings
made specifically for print.
BTW, where is this media bit which says "These bits are for printed
output only and leaving it out would apply to everything"? In the
HTML spec
<http://www.w3.org/TR/html401/present/styles.html#adef-media> I read:
This attribute specifies the intended destination medium for style
information. It may be a single media descriptor or a
comma-separated list. The default value for this attribute is
"screen".


and I've always wondered why every browser I've tried applies
stylesheets without "media" specified to all media and not only in
"screen".

--
Stanimir

Jul 20 '05 #11

P: n/a
On Sat, 27 Dec 2003 22:04:28 -0000, "William Tasso"
<ne****@tbdata.com> wrote:
William,

many thanks for the info - will follow up on that now..

Cheers

Geoff
do you have any recommendations re good
info on css?


this group - c.i.w.a.html
its sister - c.i.w.a.stylesheets
news:alt.html
news:alt.html.critique
news:alt.www.webmaster

There's a list of web sites here:
http://groups.google.com/groups?selm...ws.prodigy.com

and the home sites of many regulars - it would be unjust to single out any
particular one, I have learned much from lurking and researching - still
learning.

Start with the content - know what every page is for. Then the navigation
if applicable.

Keep the markup simple - no, make that very simple.

Learn to live with the fact that not all browsers were created equal.

Accept that 'trying to be clever' will appear as exactly that.

In any event, have fun.


Jul 20 '05 #12

P: n/a
Stanimir Stamenkov wrote:
BTW, where is this media bit which says "These bits are for printed
output only and leaving it out would apply to everything"? In the
HTML spec
<http://www.w3.org/TR/html401/present/styles.html#adef-media> I read:


Hi Stanimir,

To be honest, I wouldn't know....I've never read the HTML spec, in the same
way that I've never read the manufacturers manual for my car; I only know
how to make it work, with that knowledge being gained in the real world or
these forums!

Sorry!

Pete.
--

Peter Connolly | Macromedia Certified Dreamweaver MX Developer
http://www.acutecomputing.co.uk
Derby
UK

Jul 20 '05 #13

P: n/a
Peter Connolly wrote:
Stanimir Stamenkov wrote:
BTW, where is this media bit which says "These bits are for printed
output only and leaving it out would apply to everything"? In the
HTML spec
<http://www.w3.org/TR/html401/present/styles.html#adef-media> I read:


To be honest, I wouldn't know....I've never read the HTML spec, in the same
way that I've never read the manufacturers manual for my car; I only know
how to make it work, with that knowledge being gained in the real world or
these forums!


O.k. You didn't read the HTML spec but many have read it, and that's
is where everything begins with - the spec. And that's why I'm
bringing this issue to the attention of this forum. I must say the
spec saying is pretty logical, because many of you who haven't read
the spec use style sheets only for "screen" presentation adjustments
and applying these style rules to any other visual media like
"handheld", for example, could and in the real world lead to very
unsatisfactory results for the real human readers.

So, the moral of the story is to specify "media" for all style
sheets you supply, this way not breaking the spec's logical
intentions and in the same time working around current UAs behavior.
I work with real UAs and I know how to make it work but I read and
stick to the specs so my work won't break in newer versions of the
UAs. You're taking pretty one way approach to this stuff, IMHO.

--
Stanimir
Jul 20 '05 #14

P: n/a

"Stanimir Stamenkov" <s7****@netscape.net> wrote in message
news:bs************@ID-207379.news.uni-berlin.de...
I must say the
spec saying is pretty logical, because many of you who haven't read
the spec use style sheets only for "screen" presentation adjustments
and applying these style rules to any other visual media like
"handheld", for example, could and in the real world lead to very
unsatisfactory results for the real human readers.

So, the moral of the story is to specify "media" for all style
sheets you supply, this way not breaking the spec's logical
intentions and in the same time working around current UAs behavior.

Question, open: Is there some online resource where i can see pages through
the eyes of, say, a handheld browser? And specifically what types of devices
are we talking about? Although I appreciate that some people might view
pages with such a device, I know diddley-squat about them and have no real
understanding of what they'd require which is different from a more typical
UA.
Jul 20 '05 #15

P: n/a
"Neal" <ne**@spamrcn.com> wrote in
news:3f**********************@news.rcn.com:
Question, open: Is there some online resource where i can see pages
through the eyes of, say, a handheld browser? And specifically what
types of devices are we talking about? Although I appreciate that some
people might view pages with such a device, I know diddley-squat about
them and have no real understanding of what they'd require which is
different from a more typical UA.


The latest version of Opera (whose rendering engine is used in a lot of
mobile devices) has a "view in small screen" mode that approximates the
display you'd get on a handheld.
Jul 20 '05 #16

P: n/a
Neal wrote:
Question, open: Is there some online resource where i can see pages through
the eyes of, say, a handheld browser? And specifically what types of devices
are we talking about? Although I appreciate that some people might view
pages with such a device, I know diddley-squat about them and have no real
understanding of what they'd require which is different from a more typical
UA.


I don't know of such resource but I would like to add to the Eric's
reply for some IE for Pocket PC issues. IE for PPC includes/uses
both "screen" and "handheld" style sheet rules (which I don't like)
so one should put the "handheld" styles after the "screen" ones this
way making sure the "screen" styles will be overriden with the
"handheld" ones. Also the "handheld" styles should include any
default styles that were overriden in the "screen" part.

There are number other issues like IE for PPC having problem with
'@media' blocks where it takes only the first declaration block into
account but handling '@import' rules with media descriptor specified
better than the desktop Win IE. Fot that it is best if you could
test in a real UA. Also, IE for PPC doesn't support number of other
CSS properties like 'text-transform', 'font-variant', etc. which you
could know only if you test with it.

--
Stanimir
Jul 20 '05 #17

P: n/a
Eric Bohlman wrote:
"Neal" <ne**@spamrcn.com> wrote in
news:3f**********************@news.rcn.com:
Question, open: Is there some online resource where i can see
pages through the eyes of, say, a handheld browser?


The latest version of Opera (whose rendering engine is used in a
lot of mobile devices) has a "view in small screen" mode that
approximates the display you'd get on a handheld.


Only I can't get it to recognize a handheld stylesheet. Anyone have
better luck than I?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.