Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Transparency on/off button

    hi can anyone help me.
    i need a button which will turn on and off this piece of code.

    Code:
    <style>
    .windowbg { background-color: transparent; }
    .windowbg2 { background-color: transparent; }
    .bordercolor { background-color: transparent; }
    </style>

  • #2
    Regular Coder
    Join Date
    Jan 2004
    Location
    Georgia
    Posts
    306
    Thanks
    0
    Thanked 0 Times in 0 Posts
    use php.....

    just create the variables and youll have it.



    PHP Code:
    <?php
    //create if statement
    if  ()
    {
    print  
    "
    <style>
    .windowbg { background-color: transparent; }
    .windowbg2 { background-color: transparent; }
    .bordercolor { background-color: transparent; }
    </style>  
    "
    ;
    }
    else
    {
    }
    ?>
    ~Designer's Toolz~

  • #3
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    that sounds good.
    i can see how it would work but i know less about php than i do about html.
    is there any chance that you could show me how to even just make a simple link style button to do this?

  • #4
    New to the CF scene
    Join Date
    Feb 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    its ok i got it to work very well in html
    the code is:
    Headers
    Code:
    Code:<!-- please do not post anywhere else -->
    <style>
    div{background-color:red};
    </style>
    <style id="transparentStyleSheet"> 
    .windowbg { background-color: transparent; }
    .windowbg2 { background-color: transparent; }
    .bordercolor { background-color: transparent; } 
    </style>
    <script>
    function toggleStyle()
    {
    var transparentStyleSheet = document.getElementById("transparentStyleSheet"); 
    transparentStyleSheet.disabled = !transparentStyleSheet.disabled; 
    }
    </script>
    where you want the button
    Code:
    <!-- this is the button to turn on and off transparency --- place where you want-->
    
    <div class="windowbg">I'm a div</div>
    
    <button onclick="toggleStyle()" ID="Button1">Toggle Style</button>
    http://nuigsc.proboards19.com


  •  

    Posting Permissions

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