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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please help me with this code

    I have the following code, and it only works in Internet Explorer and Netscape, but I need it to work with those and firefox and opera.



    Code:
    <style>
    	body {background: #555555; font-family: arial; margin: 20;}
    	table.body {width: 85%; height: 100%;}
    	td.body {background: #fcfcfc;}
    	table.nav {width: 200; border-top: 1px solid black; border-right: 1px solid black; border-left: 1px solid black;}
    	td.navbuttonhead {background: url(assets/images/structure/fadebar.png); border-bottom: 1px solid #191919; color: white;}
    	td.navbuttonoff {background: #6a6a6a; border-bottom: 1px solid #191919; border-top: 1px solid #8A8A8A;}
    	td.navbuttonon {background: #8C8C8C; border-bottom: 1px solid #191919; border-top: 1px solid #8A8A8A;}
    	td.navbuttonofftop {background: #6a6a6a; border-bottom: 1px solid #191919;}
    	td.navbuttonontop {background: #8C8C8C; border-bottom: 1px solid #191919;}
    	td.bodyleft {width: 12; background: url(assets/images/structure/bodybgleft.png); border-right: 1px solid black;}
    	td.bodyright {width: 12; background: url(assets/images/structure/bodybgright.png); border-left: 1px solid black;}
    	a.navbutton {text-decoration: none; color: white;}
    	img {border: none;}
    	a.link {color: #404040; text-decoration: none;}
    	a.link:hover {color: #404040; text-decoration: underline;}
    </style>
    
    <table class="nav" cellspacing="0" cellpadding="2" style="margin-bottom: 4;" id="tableCollapsed1" style="display: none;">
    	<tr>
    		<td class="navbuttonhead">
    			<a href="#" class="navbutton" onclick="collapse(1)"><div>Test</div></a>
    		</td>
    	</tr>
    </table>
    
    <table class="nav" cellspacing="0" cellpadding="2" style="margin-bottom: 4;" id="tableExpanded1">
    	<tr>
    		<td class="navbuttonhead">
    			<a href="#" class="navbutton" onclick="expand(1)"><div>Test</div></a>
    		</td>
    	</tr>
    	<tr>
    		<td class="navbuttonofftop" onmouseover="className='navbuttonontop'" onmouseout="className='navbuttonofftop'">
    			<a href="#" class="navbutton"><div style="padding-left: 2;">Text</div></a>
    		</td>
    	</tr>
    	<tr>
    		<td class="navbuttonoff" onmouseover="className='navbuttonon'" onmouseout="className='navbuttonoff'">
    			<a href="#" class="navbutton"><div style="padding-left: 2;">Text</div></a>
    		</td>
    	</tr>
    	<tr>
    		<td class="navbuttonoff" onmouseover="className='navbuttonon'" onmouseout="className='navbuttonoff'">
    			<a href="#" class="navbutton"><div style="padding-left: 2;">Text</div></a>
    		</td>
    	</tr>
    </table>
    
    <script type="text/javascript">
    	function expand(id) {
    		document.getElementById("tableCollapsed" + id).style.display="none";
    		document.getElementById("tableExpanded" + id).style.display="block";
    	}
    
    	function collapse(id) {
    		document.getElementById("tableExpanded" + id).style.display="none";
    		document.getElementById("tableCollapsed" + id).style.display="block";
    	}
    </script>


    Any help would be nice. Thank you in advance!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    What does it do and what does it not do and what is it supposed to do?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's a menu. It looks like this.

    It starts fully expanded, then when you click the darker bar at the top (or rather, the text inside it), the bottom buttons (the lighter ones) disappear, leaving just the darker bar.

    It works and looks like it's supposed to in Internet Explorer and Netscape, but in firefox and opera it looks like this:

    Clicking the darker bar in opera does not collapse or expand the menu like it's supposed to. Clicking it in firefox gets this:
    Last edited by puddingsticks3; 05-26-2007 at 07:05 AM.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Can you post a link to the page? In the mean time maybe this will help you. http://www.dynamicdrive.com/dynamici...witchmenu2.htm
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for that, I'll work on putting it online.


  •  

    Posting Permissions

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