473,320 Members | 2,124 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,320 software developers and data experts.

alternate stylesheets

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
Jul 20 '05 #1
3 2266
re******@redstart.com (Mike Agnes) wrote in
news:be**************************@posting.google.c om:
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>
Jul 20 '05 #2
re******@redstart.com (Mike Agnes) wrote in
news:be**************************@posting.google.c om:
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/
Jul 20 '05 #3
On 12 Aug 2004 12:37:43 -0700, re******@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
Jul 20 '05 #4

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

Similar topics

13
by: Toby A Inkster | last post by:
www.authoring.stylesheets] For ages I have provided links to alternate stylesheets from my pages as per W3C recommendations: <link rel="stylesheet" href="baz" type="text/css" title="Baz"...
2
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
0
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
0
by: Jan Roland Eriksson | last post by:
Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26 Version: 2.00 URL: <http://css.nu/faq/ciwas-mFAQ.html> Maintainer: Jan Roland Eriksson...
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: User | last post by:
If I want to provide alternate stylesheets (eg red.css, green.css), is it better to put all the stuff that is common to both sheets in a separate css file (eg basic.css) and use @import at the top...
1
by: Eric Lindsay | last post by:
I am trying to understand the differences between and uses of persistent, default and alternate styles. I have read http://www.w3.org/TR/REC-html40/present/styles.html section 14.3.2 on...
9
by: johkar | last post by:
I need some browser implementation clarification. In the below example, the alternate stylesheet could be invoked by user agents that support alternate stylesheets or by script. Are there any...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.