On 28 Oct 2003 15:25:08 -0800, in
comp.infosystems.
www.authoring.stylesheets ma****@etal.uri.edu
(Maggie) wrote:
| Hi,
|
| I am in a process of creating a text version of my website and was
| wondering if it was possible to accomplish this without actually
| making the same page twice using CSS.
|
| I have a stylesheet for printing only, which has no graphics. Would
| it be possible to use the same page to display when the users clicks
| on the text version link?
|
| Or let's say I create text version of the home page and once the user
| is on it and clicks on a link from that page, it will actually go to
| the same page with graphics but with different style sheet, which will
| hide all the images.
|
| I hope I am explaining this correctly.
I'm not sure if this will help you.
In your stylesheets you can define elements for screen or printing
using the following method.
----------------------------------
<HTML>
<HEAD>
<TITLE>Test</TITLE>
<style>
@media screen {
..noPrint { display:;
background: red;
font-size: 20px;
color: white;
border: 2px solid black;
margin: 10px 10px;
padding: 10px 10px;
}
img { display:;}
..graphic { display:; border: 5px solid red; }
}
@media print {
..noPrint { display: none; }
img { display : none; }
..graphic ( display: none; }
}
</style>
</HEAD>
<BODY>
<div class="noPrint">
<p>To print this page you need to set your printer configuration.
<BR>
Select the File menu option and then Page Setup.<BR>
Set the page Orientation to Landscape.<BR>
You may or many not need to adjust the page margins.<BR>
You can also remove/adjust the page header and footer
information.</p>
<p>This message will <STRONG><u>not</u></STRONG> be printed.</p>
</div>
<P>This line will be printed.
<img src="test1.jpg" />
<img src="test2.jpg" class="graphic" />
But nothing else will.</P>
</BODY>
</HTML>
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------