| Reseller Hosting Questions about your reseller hosting account. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2003
Lives in California
78 posts
Gave thanks: 0
Thanked 0 times
|
I have seen sites where they had a link that you could press to change the CSS file in a HTML page. How do you do that?
So, for example, the default stylesheet would be "main.css" -> click a hyperlink -> the stylesheet changes to "main2.css" However, the HTML page doesn't change, or at least that's what I remember. I saw this neat function on http://www.diveintomark.org/, but apparently, he took it off.
__________________
Server: vega |
|
|
|
|
#3 (permalink) |
|
Registered User
Seasoned Poster
Joined in Oct 2003
39 posts
Gave thanks: 0
Thanked 0 times
|
This would be really easy to do by making your link a link to an alternate page where everything was the same on the page except for the stylesheet called [smile]
Kimi |
|
|
|
|
#4 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2003
Lives in California
78 posts
Gave thanks: 0
Thanked 0 times
|
I don't want to do that because my page is a dynamic weblog. But thanks for the suggestion anyway.
I sent an email to Mark (diveintomark.org) to see if he might give me his code.
__________________
Server: vega |
|
|
|
|
#5 (permalink) |
|
the one who was
Super #1
Joined in Jul 2003
Lives in Memphis
1,967 posts
Gave thanks: 0
Thanked 3 times
|
contra, I will look around for the links somewhere. It's a javascript trick. I can't remember the details of how it works, but I could hash it out if need be. But I know there is a tutorial about this somewhere. I saw it quite a while back...
__________________
Patrick Warnings: The program(s) might crash unexpectedly or behave otherwise strangely. (But of course, so do many commercial programs on Windows.) --www.gimp.org |
|
|
|
|
#6 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2003
Lives in California
78 posts
Gave thanks: 0
Thanked 0 times
|
Thanks a lot monkeyboy! :worship: I'm glad I checked back at this forum, because Mark did not reply to my email.
This function is so useful! :happyday: Edit: if you want to use this script too, change the <script language...> part to make it validate HTML: change this: <script language="JavaScript"> to this: <script language="JavaScript" type="text/javascript">
__________________
Server: vega |
|
|
|
|
#7 (permalink) |
|
Registered User
Seasoned Poster
Joined in Oct 2003
39 posts
Gave thanks: 0
Thanked 0 times
|
I don't know how the stylesheets are changed here, but this site is worth a visit.
http://www.strangebanana.com/generator.aspx |
|
|
|
|
#8 (permalink) |
|
Registered User
Seasoned Poster
Joined in Jun 2003
Lives in California
78 posts
Gave thanks: 0
Thanked 0 times
|
Mark finally replied to my email, and he redirected to A List Apart's tutorial, which seems good:
http://www.alistapart.com/stories/n4switch/
__________________
Server: vega |
|
|