Click here to get back home

alternate stylesheets

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
alternate stylesheets Mike Agnes 08-12-2004
Posted by Mike Agnes on August 12, 2004, 1:37 pm
Please log in for more thread options
I would like to link to a single XHTML file and at the same time
specify which of several alternative stylesheets should be used for
screen presentation. Is this possible with the current specification?

Example:

XHTML file is document.html

Links would be something like

<a href="document.html" stylesheet="style1.css">Basic</a>
<a href="document.html" stylesheet="style2.css">Fancy</a>

redstart


Posted by Sam Hughes on August 12, 2004, 9:14 pm
Please log in for more thread options
redstart@redstart.com (Mike Agnes) wrote in

> I would like to link to a single XHTML file and at the same time
> specify which of several alternative stylesheets should be used for
> screen presentation. Is this possible with the current specification?
>
> Example:
>
> XHTML file is document.html
>
> Links would be something like
>
> <a href="document.html" stylesheet="style1.css">Basic</a>
> <a href="document.html" stylesheet="style2.css">Fancy</a>

I hate the Web site that this tutorial is on, but...
<http://www.alistapart.com/articles/alternate/>


--
How to make it so visitors can't resize your fonts:
<http://www.rpi.edu/~hughes/www/wise_guy/unresizable_text.html>


Posted by Dave Patton on August 12, 2004, 9:19 pm
Please log in for more thread options
redstart@redstart.com (Mike Agnes) wrote in

> I would like to link to a single XHTML file and at the same time
> specify which of several alternative stylesheets should be used for
> screen presentation. Is this possible with the current specification?
>
> Example:
>
> XHTML file is document.html
>
> Links would be something like
>
><a href="document.html" stylesheet="style1.css">Basic</a>
><a href="document.html" stylesheet="style2.css">Fancy</a>

There is no 'stylesheet' attribute of the anchor tag.
You could use server-side scripting:
<a href="document.php?style=Basic">Basic</a>
<a href="document.php?style=Fancy">Fancy</a>
and have document.php generate the HTML output,
perhaps by parsing document.html and adjusting
the stylesheet name.

Or just author document.html with references
to multiple stylesheets, and let the user
choose which one they want.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/


Posted by Andy Dingley on August 13, 2004, 1:57 am
Please log in for more thread options
On 12 Aug 2004 12:37:43 -0700, redstart@redstart.com (Mike Agnes)
wrote:

>I would like to link to a single XHTML file and at the same time
>specify which of several alternative stylesheets should be used for
>screen presentation. Is this possible with the current specification?

You can link it, but they won't come.

There's a spec that says how to do this (although it uses the <link>
element, not <a>). Eric Meyer's site (www.meyerweb.com) has some
fairly robust Javascript that can allow switching between them. But
default behaviour for every browser out there is to ignore alternates.

--
Smert' spamionam


Similar ThreadsPosted
Persistent, default and alternate styles December 21, 2005, 11:40 am
java applet alternate text March 2, 2007, 11:34 am
Adjust style on ABBR or ACRONYM alternate text May 11, 2005, 2:47 pm
User stylesheets for specific sites December 21, 2005, 8:33 am
Including CSS Stylesheets - or @import? January 17, 2007, 9:25 am
Dealing with overriding styles with stylesheets in Microsoft Word November 19, 2004, 7:28 am
Can I force the client to stop caching old stylesheets and javascript? October 16, 2007, 9:50 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap