473,544 Members | 1,776 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

different style sheets for screen/printing?

Hello,

I publish some web pages using large fonts and would like to give the
user the opportunity to print the pages using a smaller font.

I believe that this is possible using different style sheets? I am not
clear how the user would select the different .css files?

Seems to be easier than having duplicate html files ...

Appreciate any help!

Cheers

Geoff
Jul 20 '05 #1
16 4175


Geoff Cox wrote:
I publish some web pages using large fonts and would like to give the
user the opportunity to print the pages using a smaller font.

I believe that this is possible using different style sheets? I am not
clear how the user would select the different .css files?


There is no need for you to select a different CSS file, rather specify
the media in the <link> element
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yaho o.de>
wrote:
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


Martin,

I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!

Cheers

Geoff

Jul 20 '05 #3


Geoff Cox wrote:
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yaho o.de>
wrote:
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!


I don't see anything wrong with the suggested lines.
Which browser are you using? Browsers like IE6/Win, Netscape 7 or Opera
7 should certainly support the stylesheet for print media, older
browsers like Netscape 4 don't support that.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4
Geoff Cox pounced upon this pigeonhole and pronounced:
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yaho o.de>
wrote:
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


Martin,

I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!


For each element in the screen css, you must have a corresponding element
in the print css, with a smaller size specified, at least for the elements
you want to be different.

h1 { font-size: 160%; } in the screen css

h1 { font-size: 140%; } in the print css

--
-bts
-This space intentionally left blank.
Jul 20 '05 #5
On Thu, 16 Oct 2003, Geoff Cox wrote:
I publish some web pages using large fonts
If you mean that you specify a font size for BODY - don't do that!
and would like to give the
user the opportunity to print the pages using a smaller font.


Just let the reader decide about typeface and font size for BODY.

Jul 20 '05 #6
On Thu, 16 Oct 2003 14:09:44 +0200, Martin Honnen <ma*******@yaho o.de>
wrote:


Geoff Cox wrote:
On Thu, 16 Oct 2003 12:09:29 +0200, Martin Honnen <ma*******@yaho o.de>
wrote:
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!


I don't see anything wrong with the suggested lines.
Which browser are you using? Browsers like IE6/Win, Netscape 7 or Opera
7 should certainly support the stylesheet for print media, older
browsers like Netscape 4 don't support that.


You are quite riight ! I must have made an error somewhere.

Thanks

Geoff


Jul 20 '05 #7
Tim
Martin Honnen <ma*******@yaho o.de>
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


Geoff Cox <ge*******@blue yonder.co.uk> wrote:
I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!


Those lines go into your HTML document, in the head section. Instead of
one stylesheet link, you're providing alternatives.

Alternatively, you could reference one style sheet in your HTML, and use
@ rules inside it, to do sections for different types of media.

A visit to the CSS specifications webpages would help you.

Such as here: <http://www.w3.org/TR/REC-CSS2/>

--
My "from" address is totally fake. (Hint: If I wanted e-mails from
complete strangers, I'd have put a real one, there.) Reply to usenet
postings in the same place as you read the message you're replying to.
Jul 20 '05 #8
On Thu, 16 Oct 2003 15:41:40 +0200, Andreas Prilop
<nh******@rrz n-user.uni-hannover.de> wrote:
On Thu, 16 Oct 2003, Geoff Cox wrote:
I publish some web pages using large fonts
If you mean that you specify a font size for BODY - don't do that!


Andreas,

the point here is that the person who is paying me wished the pages to
be made like this...they are to be read by some people with visual
impairment and I guess not all would be aware of how to change the
font themselves?

Cheers

Geoff
and would like to give the
user the opportunity to print the pages using a smaller font.


Just let the reader decide about typeface and font size for BODY.


Jul 20 '05 #9
On Fri, 17 Oct 2003 00:13:42 +0930, Tim <ad***@sheerhel l.lan> wrote:
Martin Honnen <ma*******@yaho o.de>
<link rel="stylesheet " media="screen" type="text/css" href="screen.cs s">
<link rel="stylesheet " media="print" type="text/css" href="print.css ">


Geoff Cox <ge*******@blue yonder.co.uk> wrote:
I'm a little lost here! I have added the above 2 lines using my 2
different .css files but when I go for print from the browser the
larger font text is printed ... Am I missing something here?!


Those lines go into your HTML document, in the head section. Instead of
one stylesheet link, you're providing alternatives.

Alternativel y, you could reference one style sheet in your HTML, and use
@ rules inside it, to do sections for different types of media.


Tim,

I will follow this up. Thanks.

If I wish to allow the user to select which font size to print in, I
will need to provide a duplicate html page in the different font size?

css cannot cover this?

Geoff

A visit to the CSS specifications webpages would help you.

Such as here: <http://www.w3.org/TR/REC-CSS2/>


Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

23
4851
by: Dufe | last post by:
Hello all: To deal with the problem of differing user screen resolutions, I've explored: 1) making the pages in PHP, 2) having different pages on the same page and selecting the proper one via JavaScript, and 3) using fancy redirects and forced "back skip" redirects with cookies. Every approach has some fatal flaw as far as I have been...
3
3181
by: Phil Thompson | last post by:
does it matter in which order i place different style sheets i.e. <link rel="stylesheet" type="text/css" media="screen" href="style/screen.css" /> <link rel="stylesheet" type="text/css" media="print" href="style/print.css" /> is this better than this <link rel="stylesheet" type="text/css" media="print" href="style/print.css"
6
2266
by: Roger Shrubber | last post by:
I know HTML was never designed to be WYSIWYG, but with CSS, there is much greater control over coordinates and dimensions. So I would expect that a specific piece of text, with a specific font, style, and size specified in pixels, typeset into a box with a width specified in pixels, should be identical in both screen and print versions. This...
8
4068
by: Xah Lee | last post by:
what does it mean when a style tag gives something like the following? <style type="text/css" media="screen,projection">/*<!]>*/</style> is this standard? Xah xah@xahlee.org ∑ http://xahlee.org/
1
1112
by: Fred Nelson | last post by:
Hi: I have a VB.NET web application that has been running just fine for several months without any cascading style sheets. Suddenly several users have had problems with the layout of the screen. In particular some text boxes are getting too large and covering buttons and therefore preventing them from being pushed. It appears that some...
12
2052
by: Jarno Suni | last post by:
I want a device to use styles given for media type handheld and not the styles given for media type screen, if the device supports media types handheld and screen. Is it possible without writing all styles specified for screen again for handheld? -- Homepage http://www.iki.fi/jarno.suni/
9
2016
by: Radium | last post by:
Cascading Style Sheet is an extreme hazard to your privacy. It allows others on the internet to see your monitor and files. It allows them to copy images on your monitor to their computers. It also allows them to copy files from your computer to their's. It is dangerous. Avoid at all costs. CSS that isn't stored in the victim's computer....
53
5191
by: Jonas Smithson | last post by:
In his book "CSS: The Definitive Guide" 2nd edition (pgs. 116-117), Eric Meyer has an interesting discussion about "font-size-adjust" that was evidently dropped in CSS 2.1 due to browser non-support. I'm wondering if there's some way I could still get a primitive version of this functionality, because different fonts display at very different...
10
2752
by: Ed Jay | last post by:
I do not want to load two style sheets for screen and print media. I'm having difficulty grasping the use of the @print statement, or its syntax. Would someone please provide a simple explanation. For example... If I have a style sheet specifying media="all," is the following correct syntax to center text for printing, but not for screen...
0
7434
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7371
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7388
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7716
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5925
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5305
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4925
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3425
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
676
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.