Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / October 2003



Tip: Looking for answers? Try searching our database.

Is this possible?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maggie - 29 Oct 2003 00:25 GMT
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
AD. - 29 Oct 2003 03:28 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> 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
Jukka K. Korpela - 29 Oct 2003 08:51 GMT
> 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).

Signature

Yucca, http://www.cs.tut.fi/~jkorpela/

Jeff North - 30 Oct 2003 14:59 GMT
On 28 Oct 2003 15:25:08 -0800, in
comp.infosystems.www.authoring.stylesheets maggie@etal.uri.edu

>| Hi,
>|
[quoted text clipped - 12 lines]
>|
>| 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>

---------------------------------------------------------------
jnorth@yourpantsbigpond.net.au  : Remove your pants to reply
---------------------------------------------------------------
Maggie - 31 Oct 2003 13:26 GMT
> On 28 Oct 2003 15:25:08 -0800, in
> comp.infosystems.www.authoring.stylesheets maggie@etal.uri.edu
[quoted text clipped - 65 lines]
> jnorth@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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.