Web Analytics Made Easy -
StatCounter multiple style options for users? - CodingForum

Announcement

Collapse
No announcement yet.

multiple style options for users?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple style options for users?

    I want to have an option to where the user can choose from 9 different css created styles, and wanted to know how this can be achieved, as i have seen msn, google, excite, and other sites use this, whats the best language to use...


    or could this simply be achieved by a simple tag in the header opition and with cookies?


    thanks in advance

  • #2
    You should just be able to create multiple external stylesheets and switch them using JavaScript to alter attribute values. I understand that you can create alternate stylesheets with the link element but I'm not sure how you would switch between them.
    Last edited by Arbitrator; Oct 10, 2006, 01:48 PM. Reason: clarification

    Comment


    • #3
      any ideas on where i can get the info for the javascript, tutorial or something... thanks

      Comment


      • #4
        Take a read through http://alistapart.com/articles/alternate - it's a bit convoluted to do, with cookes, JS and all, but it works...

        Dave

        Comment


        • #5
          I experimented with this using code authored from scratch. Internet Explorer is a pain as usual.

          Both versions work fine in Firefox and Opera. The first produces an error and does nothing in Internet Explorer. The second almost works for Internet Explorer except that (A) the styles are painted onto only part of the screen instead of all of it and (B) the styles remain when the stylesheet is removed. With case "A", the rest of the screen gets painted when you minimize IE or move another window over it. With case "B", the styles persist even after removal of the element that references an external stylesheet. Once again, Internet Explorer is clueless.

          Comment


          • #6
            thanks
            Last edited by thepcnerd; Oct 11, 2006, 12:01 AM.

            Comment

            Working...
            X