Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Alternate Style Sheet, hows that?
Lozbo
post Sep 15 2005, 09:22 PM
Post #1


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



I know that you can declare alternate stylsheets for your pages, but i dont know how will a user change it, i mean, i know you can change styles depending on media, or even with some js or server side coding, but with pure html? how does the user set what style he wants to be displayed?

the code goes something like that:

CODE

<link title="Alternate Style" href="/alt1.css" rel="alternate stylesheet" media="screen" type="text/css" />


thanks...

-lozbo
Go to the top of the page
 
+Quote Post
Tyssen
post Sep 15 2005, 09:48 PM
Post #2



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



You need to incorporate javascript - A List Apart has a good article.
Go to the top of the page
 
+Quote Post
arboc7
post Sep 16 2005, 01:01 AM
Post #3


Advanced Member
*******

Group: Members
Posts: 123
Joined: 5-September 05
Member No.: 11,522



QUOTE(Tyssen @ Sep 15 2005, 04:48 PM)
You need to incorporate javascript - A List Apart has a good article.
*




There is no way, to my knowlege, that a user can change to an alternate stylesheet using pure HTML. For the javascript approach, use Tyssen's approach. I also think that some browsers allow the user to change stylesheets and even add personal ones, but I have yet to come across one (that has a resonable user-base) that lets me do that.

Go to the top of the page
 
+Quote Post
jlhaslip
post Sep 16 2005, 05:37 AM
Post #4


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,954
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



I don't know that the user can change css files, but by the rules of the cascade, the user can override certain attributes and make their choice become the current setting. The user has the ultimate control by setting certain rules for their browser and the browser rules override the css file. This is a very important aspect of the cascade rules for disabled / visually impaired users. It allows those with handicaps to use the web because by setting the browser rules to suit their impairments, they become less impaired. For example, the font size that you want to use on your web site may be too small for those who are visually handicapped. But, by allowing the browser rules to over ride the web site css rules, the visually impaired users are better able to navigate and use your site. It is a good thing if you happen to be a user who needs the control, but it is a bummer for the web site designer.
Go to the top of the page
 
+Quote Post
Tyssen
post Sep 16 2005, 05:42 AM
Post #5



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(jlhaslip @ Sep 16 2005, 03:37 PM)
It is a good thing if you happen to be a user who needs the control, but it is a bummer for the web site designer.

Not really, not if you know how to make your layouts scalable/resizable.
Go to the top of the page
 
+Quote Post
littleweseth
post Sep 16 2005, 06:18 AM
Post #6


Member [Level 2]
*****

Group: Members
Posts: 85
Joined: 27-August 05
From: QLD, Aus. G'day!
Member No.: 11,186



arboc7 : in firefox, View > Page Style > [ No Style | Default Style [ Alternate Style ] ]......
I think that's how you do it, anyway. I'm too lazy to hack up a test page right now.
Go to the top of the page
 
+Quote Post
Lozbo
post Sep 17 2005, 05:49 PM
Post #7


Super Member
*********

Group: Members
Posts: 282
Joined: 1-September 05
From: Wanatos
Member No.: 11,382



alright, thanks then, i just thought that as this alternate style sheets had its own attribute declaration in the html link tag, it might have a functional way of switching those from within the html document itself, no additional scripting required...

And that ALA article is going to be very helpul, thanks, ill take that js... smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Need Help On "global News" Problem.(7)
  2. Question About Css(5)
  3. Style Not Displayed Correctly On Firefox [resolved](16)


 



- Lo-Fi Version Time is now: 21st August 2008 - 01:27 AM