Results 1 to 4 of 4

Thread: button to change wesite colour scheme

  1. #1
    asphinctersayswhat dannyboy83's Avatar
    Join Date
    Sep 2005
    Location
    Hamilton, Scotland
    Posts
    677
    Thanks
    3
    Thanked
    0 times in 0 posts

    button to change wesite colour scheme

    Not sure if this is in the right place, but I need some website advice.

    I would like to add in a button that changes the website's colour scheme, presumably through CSS. I'm sure I've seen it on other sites, but I'm wondering if there are any code resources out there than I can take and tweak.

    Cheers.

    My System: Coolermaster Centurion 5 (black) case, Intel E6750 Core2Duo, Tagan Easy-Con 530W, Asus P5B Deluxe WIFI, OCZ 2GB Kit (2x1GB) DDR2 800MHz/PC2-6400 CL 4-4-4-15 PLATINUM XTC, Samsung SpinPoint 200Gb SATA2 / 2 x Maxtor DiamondMax 10 200Gb SATA, 256Mb Sapphire ATI PCI-E X1950PRO, Creative X-Fi Xtreme 7.1, 19" Daewoo W9ZQ Black Widescreen TFT, 4Mb Virgin Cable Broadband (formerly Blueyonder) with Linksys WRT54GL Wireless-G and DD-WRT firmware.

  2. #2
    Gaarrrrr! Dav0s's Avatar
    Join Date
    Aug 2005
    Location
    Bristol
    Posts
    1,442
    Thanks
    1
    Thanked
    3 times in 3 posts
    usually done thru php query strings

    <a href=index.php?theme=red>Click Here for Red Theme</a>

    then in your php code...
    PHP Code:

    <?php
    //get the theme from query string
    $theme $_GET['theme'];

    //couldnt remember the syntax for style, it might be href=red.css

    if ($theme == red) {
    echo 
    "<style type=text/css link=red.css>";
    } else if (
    $theme ==blue) {
    echo 
    "<style type=text/css link=blue.css>";
    } else {
    echo 
    "<style type=text/css link=red.css>";
    }

    //then all your page content

    ?>
    quickly knocked up, and couldnt remember syntax for <style> but im sur eosmeone can clear it up.

  3. #3
    asphinctersayswhat dannyboy83's Avatar
    Join Date
    Sep 2005
    Location
    Hamilton, Scotland
    Posts
    677
    Thanks
    3
    Thanked
    0 times in 0 posts
    many thanks for this. Will have a go sometime!

    My System: Coolermaster Centurion 5 (black) case, Intel E6750 Core2Duo, Tagan Easy-Con 530W, Asus P5B Deluxe WIFI, OCZ 2GB Kit (2x1GB) DDR2 800MHz/PC2-6400 CL 4-4-4-15 PLATINUM XTC, Samsung SpinPoint 200Gb SATA2 / 2 x Maxtor DiamondMax 10 200Gb SATA, 256Mb Sapphire ATI PCI-E X1950PRO, Creative X-Fi Xtreme 7.1, 19" Daewoo W9ZQ Black Widescreen TFT, 4Mb Virgin Cable Broadband (formerly Blueyonder) with Linksys WRT54GL Wireless-G and DD-WRT firmware.

  4. #4
    sneaks quietly away. schmunk's Avatar
    Join Date
    May 2004
    Location
    Wiki Wiki Wild West side... of Sussex
    Posts
    4,424
    Thanks
    40
    Thanked
    163 times in 121 posts
    • schmunk's system
      • Motherboard:
      • Abit NF7-S v2.0
      • CPU:
      • AMD Athlon-M 2500+
      • Memory:
      • 1GB of Corsair BH-5 and 512MB of something else
      • Storage:
      • 160GB Seagate Barracuda
      • Graphics card(s):
      • ATI Radeon X800Pro, flashed to XT
      • PSU:
      • Hiper Type-M ~400W
      • Case:
      • Antec cheapy
      • Monitor(s):
      • AG Neovo F19 LCD
      • Internet:
      • Virgin Media 4MB/s
    Howard's website has this, so he should be able to confirm the method.

    ('Howard' on Hexus, BTW)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change the colour of the barchart/graphs in reviews
    By davidstone28 in forum HEXUS Suggestions
    Replies: 1
    Last Post: 18-12-2005, 05:49 PM
  2. Change Default Windows XP Colour Scheme?
    By Jonny M in forum Software
    Replies: 2
    Last Post: 07-01-2005, 11:59 PM
  3. Need a colour scheme!
    By Steve in forum Software
    Replies: 3
    Last Post: 03-04-2004, 04:45 PM

Posting Permissions

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