There a number of ways of doing it and we touch on a number of the answers here:
Changing styles "on the fly"
One simple way is to use this:
code:
<script language="Javascript" type="text/javascript">
<!--
function setStyle (stylename) {
var lnk = document.getElementsByTagName("LINK")&#91;0&#93;;
lnk.href = stylename;}
//-->
</script>
Doc Ozone has worked another one of these techniques up into an excellent example at Znippets here:
ZScrollBar demo
Another way is used in this article at AListApart:
style sheet switcher
------------------------
Relevant threads:
Changing styles "on the fly"
Default CSS
------------------------
Relevant note:
As of the time of writing this FAQ was number 1 in searches at google for the terms change, stylesheets.
__________________
Emperor
(Added by: Emperor on Sun 19-May-2002)
(Edited by: Emperor on Wed 30-Jul-2003)
|