473,396 Members | 1,924 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,396 software developers and data experts.

Is this possible?

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.

Thanks a lot
Maggie
Jul 20 '05 #1
4 2091
AD.
On Tue, 28 Oct 2003 15:25:08 -0800, 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.


You would probably need some scripting to do this. I personally would use
server side scripting (eg PHP) to either link a different stylesheet or
not include one at all.

The text only link could be something like:
<a href="mypage.php?style=text">Text Only</a>
And the php code in the page could decide what stylesheet to include based
on the value of the 'style' variable.

This would require another page load, but I assume you are trying to
reduce page maintenance effort rather than reduce server load.

If you need more help, a newsgroup for your favourite scripting platform
would be the best bet.

It may be possible with Javascript on the client without another page
load, but I think doing it on the server is more robust.

Cheers
Anton
Jul 20 '05 #2
ma****@etal.uri.edu (Maggie) wrote:
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.
Please use a more descriptive Subject line in future.

Also please note that text versions are _not_ recommended in accessibility
guidelines and rules. On the contrary, they say that text versions should
_not_ be created, except if you have _failed_, after all attempts, to comply
with the guidelines and rules in the recommended way. See e.g.
http://www.w3.org/TR/WCAG10/#tech-alt-pages
I have a stylesheet for printing only, which has no graphics.
This might or might not be a good idea. It depends on whether the graphics
are useful in printed copies or not. Large decorations often aren't.
Would
it be possible to use the same page to display when the users clicks
on the text version link?


Why would you do that? People who access your primary page using a text-only
browser, or a speech browser, or a graphic browser with image display
disabled, will get the alt attribute values in place of the images.
It's those values that you should worry about, not a text version.
And it's CSS related only to the the extent that
a) some use of images should be replaced by the use of styled text and
b) you should consider the possibility of styling <img> elements for the
purpose of making the alternate text appear the best possible way
on advanced graphic browsers with images disabled (so that e.g.
the textual alternative for a logo image, if nonempty, appears in
a manner that simulates the appearance of the logo).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3
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
---------------------------------------------------------------
Jul 20 '05 #4
Jeff North <jn****@yourpantsbigpond.net.au> wrote in message news:<r4********************************@4ax.com>. ..
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
---------------------------------------------------------------


Hi,

Thanks a lot for your input but I was hoping to have 2 different
stylesheets for the screen. I already have it set up for printing.
But thanks anyway

Maggie
Jul 20 '05 #5

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

Similar topics

4
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
7
by: Andrzej | last post by:
Is it possible to call a function which name is given by a string? Let assume that I created a program which call some functions for example void f1(void), void f2(void), void f3(void). ...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
by: AAA | last post by:
hi, I'll explain fastly the program that i'm doing.. the computer asks me to enter the cardinal of a set X ( called "dimX" type integer)where X is a table of one dimension and then to fill it...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
4
by: RSH | last post by:
Okay my math skills aren't waht they used to be... With that being said what Im trying to do is create a matrix that given x number of columns, and y number of possible values i want to generate...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
14
by: bjorklund.emil | last post by:
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...
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,...

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.