so i am pretty new to css and javascript and i was wondering if you could make a script that allows you to change what stylesheet the site uses. like say you had a green theme where everything was shades of green you would make so the user can change it to red with the press of a button. anyone have any idea how to do this?
Tell me more
×
Stack Overflow is a question and answer site for
professional and enthusiast programmers. It's 100% free, no registration required.
You can set an Id to the link tag and switch the css at runtime. HTML
JS
|
|||
|
Yes, you can change CSS with Javascript. See this tutorial for more info. It basically links multiple stylesheets like this:
And then uses Javascript to change it:
The switch_style() function is written in that tutorial. |
|||
|