views:

84

answers:

1

I have a simple web app, it's done with several JSP pages. I would like to add some style to it. I would like to provide some color theme options say like in a drop down box. I have little basic knowledge of CSS. Here are my questions:

  1. I think I should have all styles in one CSS file, and use format like selector#different_ids {property:value} to keep all styles, is that correct?
  2. Once a theme is selected, how should it be saved? using request.getParameter("") every time or use JavaScript?
  3. How can I change the theme according to the saved selection? Would it be correct if I use if..else if in Java, and associate each tag with corresponding id for different_ids?
  4. How can the theme selection be passed from page to page? Should it be done with JavScript?

Thank you

+2  A: 
  • create a cookie for the selection. that will pass the selection from page to page.
  • put each theme into different css files.
  • link the appropriate css file according to the selection
palindrom