-2
How multiple themes work on a website?
I have
themeRED.css e themeBlue.css
Do I have to save the css location to the bank? or there’s an easier way ?
-2
How multiple themes work on a website?
I have
themeRED.css e themeBlue.css
Do I have to save the css location to the bank? or there’s an easier way ?
1
Not necessarily you need to save in bank.
You can use javascript to check which Theme used and load it.
Here’s an answer on how to load the CSS by Javascript:
https://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript
1
Save the theme name in the database and when loading the CSS file use the user theme string to load the css(s) with that theme.
Ex: "tema1"
HTML:
<link rel="stylesheet" src="temas/tema1/geral.css" />
Just like Jquery UI does with its different themes... no mystery. :)
Browser other questions tagged css
You are not signed in. Login or sign up in order to post.
How do you want the
themeRED.css
orthemeBlue.css
, which configuration, which will be responsible for knowing which theme to use. Example: the logged x user has the themethemeRED.css
and user Y has thethemeBlue.css
, then it would be simple for you to decide who is whose !!! ???– user6026
Rod, can you explain it better? Changing the site’s CSS "in real time" can be very useful but it’s not clear that’s what you want, nor how. If you explain it better it makes it easier to answer.
– Sergio
What a mess the reasons are giving to close this question! If it is to close, it would be by "it is not clear what you are asking". Because clearly there’s something not said there that prevents the emergence of an answer "on the fly".
– bfavaretto
I wanted to understand, because, this question was suspended, could be edited and add to that question ... ?
– user6026