Turning CSS OFF and back ON

Discussion in 'PHP' started by Rezo, May 4, 2006.

  1. #1
    How would you like a script that enabled a user to turn off your CSS with a click of a link and return it just as easily?

    With this little script you can:

    In the <head> of your document:

    
    <?php
    if( $_GET['css'] != 'false' )
    {
     ?>
     <link rel="stylesheet" type="text/css" href="mystyle.css" />
     <?php
    }
    ?>
    
    PHP:
    And the Links:
    
    CSS: <a href="?css=false">OFF</a> - <a href="?css=true">ON</a>
    
    PHP:
    Easy enough to understand, the OFF link turns the CSS off and the ON button I think you can work out for yourself

    Simple huh? :D
     
    Rezo, May 4, 2006 IP
  2. just-4-teens

    just-4-teens Peon

    Messages:
    3,967
    Likes Received:
    168
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why not just use a theme switcher? one with a blank css stylesheet?

    or even better just turn off css in firefox View > Page Style > None
     
    just-4-teens, May 4, 2006 IP
  3. wvccboy

    wvccboy Notable Member

    Messages:
    2,632
    Likes Received:
    81
    Best Answers:
    1
    Trophy Points:
    250
    #3
    Ha ha.. Probably something you'd put in an admin panel...
     
    wvccboy, May 4, 2006 IP