How to save CSS?StyleSheet in Database ?

css , java , database , hibernate , html , wicket Lahore, Pakistan
  • 11 years ago


    Is there any way to store CSS settings and classes into a database. I have a css file describing styles for whole website. I want to give user an option, to modify styles (background color, font, table header font, etc.) of thier own choices (at run-time). When user selects from the given options and hit save, then these values store in the database, so that when user visits the website next time then customized styles (theme) should be displayed on the web pages rather than default styles. I know this can be done by using cookies (through javascript) but the problem arises when user visits the website after deleting private data of browser. In this way, again default styles applies to all web pages. Also, I am using Java (Wicket framework).

    Is there any way to make css file dynamic (using variables in css file), or to save css classes (styles) into database ?

    Thanks, Farhan.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.” - Brian Kernighan