#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Canada
    Posts
    7
    Rep Power
    0

    Client Side CSS Options


    Hi,

    I was wondering if there is a tutorial somewhere or if someone would be willing to help me in having a client side option of which css style sheet is enabled.

    http://opcoin.city-17.net/newsite

    The above URL is where I am creating the website which I would like to have two options to change the CSS Style Sheet. So far I have created both sheets that I want to have options for.

    http://opcoin.city-17.net/newsite/styles/army.css
    http://opcoin.city-17.net/newsite/styles/guer.css

    A simple drop-down menu on the side of the page would be the ideal way of selecting which CSS Sheet the client would like to enable. The preference would then be stored in a cookie (which I also need help with because I don't know how to bake ).

    Any help would be much appreciated!
  2. #2
  3. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    you could use alternative style sheets,
    with the link tag,

    ie.
    <link rel="alternate stylesheet"
    title="Oldstyle" href="http://www.w3.org/StyleSheets/Core/Oldstyle">



    http://www.w3.org/Style/Examples/007/alternatives.html
  4. #3
  5. :(){ :|:&};:
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Germany
    Posts
    297
    Rep Power
    11
    Hmm this page should give you an idea:
    http://www.e-lusion.com

    But if that is too complicated or not what you are looking for:
    I am using a Javascript Function to create a cookie, from which I read the value using PHP and print the value of that cookie into the <link /> Tag using PHP again. It is very simple but in my eyes everything I need If you need help with this, please post again, or email me.

    As for switching Styles, there is a Page called Zengarden at w3.org which is dedicated to this issue I don't have the url at hand right now - just search for it at w3.org
    regards >_<

    ws. fgeller.de
    em. felix@fgeller.de
  6. #4
  7. :(){ :|:&};:
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Germany
    Posts
    297
    Rep Power
    11
    @Akh

    Is that supported by IE already? I know that Mozilla is able to do that and offers you a new menu option - but offers IE that too ?
    regards >_<

    ws. fgeller.de
    em. felix@fgeller.de
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Canada
    Posts
    7
    Rep Power
    0
    Thanks a lot guys I will first try what Akh posted, then see what goes from there.

    Zen Garden: http://www.w3.org/Style/CSS/

    That example you posted was great fgeller! But, I like the sounds of what you are doing even better I might e-mail you if I need more help.

    Thanks again
  10. #6
  11. :(){ :|:&};:
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Germany
    Posts
    297
    Rep Power
    11
    Do as you wish

    Good luck
    regards >_<

    ws. fgeller.de
    em. felix@fgeller.de
  12. #7
  13. |<.+#f@#+.&.|
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2002
    Location
    norway
    Posts
    3,009
    Rep Power
    1224
    Originally posted by fgeller
    @Akh

    Is that supported by IE already? I know that Mozilla is able to do that and offers you a new menu option - but offers IE that too ?
    not sure as i can't check it right now,
    but most browsers do support it, mozilla, opera, konqueror,
  14. #8
  15. :(){ :|:&};:
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Germany
    Posts
    297
    Rep Power
    11
    hmm I tested w3.org/style and it did not work. But well Internet Explorer 6 sucks anyways It isn't up to date if you try to use the new css features.. Kind of the total opposite from what is was a few years ago, thinking of ie4 when MS was kind of the Avantgarde of CSS
    regards >_<

    ws. fgeller.de
    em. felix@fgeller.de

IMN logo majestic logo threadwatch logo seochat tools logo