eleven0 Posted February 8, 2008 Share Posted February 8, 2008 I'm putting up a master menu. But i got a problem with something. Active tab is not working. I got this for my menu; <div id="menu"> <ul> <li id="current"><a href="index2.php">Home</a></li> <li><a href="index.php">Forums</a></li> <li><a href="index3.php">Download</a></li> <li><a href="#">Contact</a></li> <li><a href="#">Help</a></li> <li><a href="#">Other</a></li> </ul> </div> here i got this in CSS; #menu { clear: both; margin: 0; padding: 0 40px 0 0; font:12px/26px Tahoma, Sans-serif; text-transform: uppercase; height: 26px; } #menu ul { float: left; list-style: none; margin:0; padding: 0; } #menu ul li { display: inline; } #menu ul li a { display: block; float: left; padding: 0 8px; color: black; text-decoration: none; } #menu ul li a:hover { background-color: #666; color: #cccccc; } #menu ul li#current a { background-color: #474A41; color: #333; } When you click on on another page, it would still show it like you are on "Home" page. Thanks for any help. Quote Link to comment https://forums.phpfreaks.com/topic/90063-site-menu-help/ Share on other sites More sharing options...
GameYin Posted February 8, 2008 Share Posted February 8, 2008 Do you have a website where we can take a look at this? Also your #menu ul { float: left; list-style: none; margin:0; padding: 0; } You placed the ul's outside of everything, so everything nested inside of ul will get the benefits of the CSS code. Quote Link to comment https://forums.phpfreaks.com/topic/90063-site-menu-help/#findComment-461764 Share on other sites More sharing options...
eleven0 Posted February 8, 2008 Author Share Posted February 8, 2008 No, actually... I work on my localhost... But I'll set up a demo site as soon as I get home... my problem is when you click on Downloads, it would still show it as you were on "Home" page. This goes for every page in the menu. So any ideas how I'll get this working? Quote Link to comment https://forums.phpfreaks.com/topic/90063-site-menu-help/#findComment-461775 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.