|
| |
|
|
Mane
Posts: 106 Joined: 7/7/2005 Status: offline
|
Change CSS file through dropdown - 7/14/2005 17:02:56
Is there a way to make a dropdown list change the css file for the page?
|
|
|
|
yogaboy
Posts: 377 Joined: 5/22/2004 Status: offline
|
RE: Change CSS file through dropdown - 7/15/2005 6:34:21
If you are using XHTML you could use the @import to plop (that's a technical phrase) a new style sheet over the top of the main one. I use the stuff below to make sure IE lines up properly, but you could easily change it for a select menu. This goes in the head tags <link rel="stylesheet" href="links3.css" type="text/css" /> <!--#include virtual="/includes/slctBrowser.asp"--> and this is the slctBrowser code <% select case browser case "IE" Response.write "<style type='text/css'>@import url('/linksie.css');</style>" end select %>
|
|
|
|
yogaboy
Posts: 377 Joined: 5/22/2004 Status: offline
|
RE: Change CSS file through dropdown - 7/15/2005 6:40:08
Forgot this bit - put it right at the top just after the doc declaration. I use it to find out whether they're using IE or not, but there's also a javascript detection bit that I never use, don't know how good it is????? <% 'declare variables Dim browserdetect, browser, version, majorver, minorver, platform, tables, cookies, javascript ' create an instance of the Browser Capabilities component Set browserdetect = Server.CreateObject("MSWC.BrowserType") browser=browserdetect.Browser version=browserdetect.Version majorver=browserdetect.Majorver minorver=browserdetect.Minorver platform=browserdetect.Platform tables=browserdetect.Tables cookies=browserdetect.Cookies javascript=browserdetect.JavaScript %>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|