Results 1 to 6 of 6

Thread: Style Switcher - Multiple Styles?

  1. #1
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Lightbulb Style Switcher - Multiple Styles?

    Style Switcher v1.1

    Can Be Found Here

    Well i'm having a problem, basically on my layout i want TWO stylesheets to apply to the pages look at any one time.

    One contaning just the color of the background

    Another with everything to create the layout

    So the user can change the background color, and also change the layout color by changing one of the two Stylesheets.

    Now i wondered if it was a simple case of adding id='' to the style sheet code in <head> and the style changing link, but i'm not that experienced in JS and HTML, or whatever coding language

    Help much appreciated, Alex.

  2. #2
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    anybody know how, i really need

  3. #3
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Yes, it was clear, but confusing, your goal is to give an id to the <style> tag? If so, try to have this script:
    Code:
    <script type="text/javascript">
    window.onload=function(){
    document.getElementsByTagName('style')[0].setAttribute('id','whatever');
    // Set the ID of the first <style> tag.
    }
    </script>
    If nothing works, mind rephrasing your question.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  4. #4
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Ok Sorry about the question.

    I have two CSSs

    One for theme color, one for box colour (dosent matter really)

    Now i have two so say i can have blue theme, orange boxes.

    Now i want to be able to switch these two styles.

    like using a link i want to change theme to green.

    and with another change boxes to red

    so basically i need a way of using the style switcher script v1.1 to be able to work on two styles induvidually

    hope that clears up things, im sorry about not being clear.

  5. #5
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Please guys
    there must be a way!

  6. #6
    Join Date
    Aug 2008
    Posts
    16
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Please?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •