#1
  1. Freelance Webdesigner
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    38
    Rep Power
    11

    How can i use two css ?


    How can i use two css and switch them at just one mouse click
  2. #2
  3. HTML/CSS/Photoshop maven
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    CA
    Posts
    184
    Rep Power
    12
    I don't know the exact code to do this, but you can set a link to change the HTML of a <link> tag to one stylesheet or another.
  4. #3
  5. Cunning Linguist
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2003
    Location
    I used to live at home, now I stay at the house
    Posts
    10,180
    Rep Power
    2038
    Code:
    <html>
    <head>
    <link rel=StyleSheet href="one.css" title="Contemporary" id="one">
    </head>
    <body>
    <a href="#" onClick="document.getElementById('one').href='two.css';">Two</a><br>
    <a href="#" onClick="document.getElementById('one').href='one.css';">One/a>
    </body>
    </html>
    Or something along those lines...
    Last edited by ChiefWigs1982; December 4th, 2003 at 05:01 AM.
  6. #4
  7. what's your moniker?
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Location
    Highland Park, NJ
    Posts
    201
    Rep Power
    11
    here's a nice open source style sheet switcher

    http://www.alistapart.com/articles/alternate/
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    England
    Posts
    32
    Rep Power
    11
    And another nice 1. But its using javascript as well. But works really well.

    You will be best off download the JS file to edit it

    http://templates.fogcreek.com/styleswitch/
    <NO DONT LOOK AT ME!>
  10. #6
  11. HTML/CSS/Photoshop maven
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    CA
    Posts
    184
    Rep Power
    12
    It also uses the exact same code...
    Originally Posted by Eye's link
    BTW, sorry, I looked at you.

IMN logo majestic logo threadwatch logo seochat tools logo