473,467 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Print CSS Not Loading

alt.html pointed me here, so...

I have two CSS files for print and screen. In screen.css:

..screen
{
font-weight:bold;
font-size:12px;

}

..print
{
visibility:hidden;

}

In the HTML:

<html>
<head>
<link rel="stylesheet" type="text/css" media="print"
href="print.css" /

<link rel="stylesheet" type="text/css" media="screen"
href="screen.css" />
</head>
<body>
<font class="screen">Text A</font><br><font class="print">Text B</
font>

[etc.]

In print.css, the parameters are swapped. In other words, Text B will
show on the printed page, but not on screen, and vice-versa for Text
A.

But as it stands now, it's not quite working. On "screen," it looks
OK; hidden text is hidden, shown text is shown. When printed in
Firefox 2, though, the output looks no different from on "screen." I'm
stumped why this is, and so is everyone else I've shown this to. Any
ideas?

Sep 20 '07 #1
4 2841
On Thu, 20 Sep 2007, wi**********@gmail.com wrote:
alt.html pointed me here, so...
I have two CSS files for print and screen.
.... and I point you to
news:comp.infosystems.www.authoring.stylesheets
http://groups.google.com/group/comp....ng.stylesheets
Sep 20 '07 #2
wi**********@gmail.com wrote:
alt.html pointed me here, so...

I have two CSS files for print and screen. In screen.css:
You've left out too much context to give an answer.
Please provide an URL to a test case that demonstrates the problem.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Sep 20 '07 #3
wi**********@gmail.com wrote in
news:11**********************@n39g2000hsh.googlegr oups.com:
>
<html>
<head>
<link rel="stylesheet" type="text/css" media="print"
href="print.css" /

One reason why it's better to give a URL than to post code. No one
here can say if that's an error in copy/paste or in your original page,
but this link element isn't closed. And unless you're doing XHTML,
just use ">" and not "/>". A validator would help you find a problem
like that immediately.
Sep 21 '07 #4
Scripsit Thomas Dowling:
><html>
<head>
<link rel="stylesheet" type="text/css" media="print"
href="print.css" /

One reason why it's better to give a URL than to post code.
Indeed.
No one
here can say if that's an error in copy/paste or in your original
page, but this link element isn't closed.
Technically, it is.
A validator would help you find a
problem like that immediately.
No, it would not. Try it. The link element's markup is valid, HTML 4.01.

It's time for a rerun of the Saga of the Slashed Validators:
http://www.cs.tut.fi/~jkorpela/qattr.html
(even though it mainly discusses variants like <a href=../foo.html>, which
can be even more deceptive).

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Sep 21 '07 #5

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

Similar topics

12
by: Wes Groleau | last post by:
Is there a good how-to and/or example of a simple way to have a web page look decent on both screen (in most browsers) and in print? The example in the W3C CSS manual does NOT do it. -- Wes...
21
by: Steel | last post by:
Hi at all, I have a very long html page with many photo. Therefore the best to print this page is to print the some page as PDF. Therefore I maked a PDF file like my page to print best. I'ld want...
5
by: Alan | last post by:
While not rs.eof <td><%=rs("InvoiceNo")%></td> <td><%=rs("Name")%></td> <td><a href="InvoicePrint.asp?WInv=<%=rs("InvoiceNo")%>"></a></td> <td>Print this invoice</td> rs.MoveNext Wend Now...
4
by: Matt Mercer | last post by:
Hi, I have a asp .net/VB web app that does the typical submitting and retrieving from a SQL database. I am lost as to how I should create a print friendly page for the data. Here is the...
0
by: Baren | last post by:
Hi!, I have a huge amount of data around 1lakh and i am loading the same on a web browser( Internet Explorer). The Page is not loading and application hangs. I am using Tables to print the data....
2
by: Kosarko | last post by:
Hello, I know this should be kind of easy, but I am very unfamiliar with Javascript. What I am looking to do is have an image (coupon) that when clicked on, it either prompts for printing...
6
by: Eraser | last post by:
hi guys.... how i would now that the iframe loading of chart fx graph is completed... i used a window.print on page load with multiple iframes on the same page.... what happen is once the print...
1
by: Hugh Oxford | last post by:
Using Javascript I can use the Window.print() function to open a print dialog box. I want to print a different page however, without loading it up first. Is there any way of using output...
10
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....
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
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
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...
0
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...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.