473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

confused re media="print" / printing pages?

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
17 2363
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
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
"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
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
"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
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
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
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
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
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
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
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
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

"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
"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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Curious Angel | last post by:
Hi, I have a version of my resume that is (almost) web ready and I'm pleased with its appearance on the screen (well, sort of heh heh, it's my first HTML). I also created a tighter, scaled-down...
2
by: ivowel | last post by:
dear css wizards: I have a document that has some annotations, which I sometimes want included, sometimes not. <div class="myannotation">some text</div> is there a css mechanism to tell the...
8
by: Tony | last post by:
Hello I am learning C# and encountered the following problem when I tried to figure out how to print the string {0} in a Console window The following piece of codes complied OK. But when I...
5
by: Paul Sullivan | last post by:
We are a state agency that views protected medical information via our intranet. The screens even have privacy shields. Alarmingly, uses can "Print" and "Save As" which destroys the protection of...
1
by: Jeremy | last post by:
I don't know if this is really a javascript question but thought I may as well start here... I know that a "document" is what is displayed in a browser window. However it is possible for the...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
10
by: Pete | last post by:
I have the following code: <built-in method close of file object at 0xb7cc76e0> The file "temp.html" is created, but it doesn't look like the page at www.python.org. I'm guessing there are...
45
by: Umesh | last post by:
please help. thanks.
0
by: moti far | last post by:
hi, i use stylesheet to design the plot of the print page. The page works with https(ssl) protocol. this my code: <html> <head>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.