Liquid Fire Posted July 4, 2007 Share Posted July 4, 2007 here is the css code for my menu(not my code, something i found somewhere online): /*Top Drop Down Menu*/ #menu { width: 100%; float: right; } #menu ul { color: white; list-style: none; margin: 0; padding: 0; float: left; } #menu h2 { font: bold 16px arial, helvetica, sans-serif; display: block; margin: 0; padding: 2px 3px; } #menu li { background-color: #BBBBBB; font: bold 10px arial, helvetica, sans-serif; display: block; margin: 0; padding: 2px 3px; } #menu li.sub_menu { width: 115px; padding-top: 2px; padding-bottom: 2px; background-color: #999999; } #menu a { text-decoration: none; color: #3E3E8E; width: 115px; } #menu a:hover { color: #FFFFFF; } #menu li { position: relative; } #menu ul ul { position: absolute; z-index: 500; } #menu ul ul ul { width: 150px; top: 0; left: 100%; } div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul { display: none; } div#menu ul li:hover ul, div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul { display: block; } and here is and example of my XHTML: <ul> <li> <h2><a href="javascript:void();">Project Admin</a></h2><ul> <li class="sub_menu"> <a href="<?php echo $kd_config['site_url']; ?>/admin/project/index.php">Home</a> </li> <li class="sub_menu"> <a href="<?php echo $kd_config['site_url']; ?>/admin/project/manage.php?type=new_project">Add Project</a> </li> </ul> </li> </ul> but the link only appears when mouse is over the work and most other css based menu have it if it is anyway, any help? Quote Link to comment https://forums.phpfreaks.com/topic/58337-li-and-link/ Share on other sites More sharing options...
soycharliente Posted July 7, 2007 Share Posted July 7, 2007 When I render that code, I get a list type structure with all the links as blue. Nothing changes when hovering or anything. All backgrounds are white and all links are blue. Are you sure that you have all your classes/ids in? Quote Link to comment https://forums.phpfreaks.com/topic/58337-li-and-link/#findComment-291931 Share on other sites More sharing options...
Azu Posted July 11, 2007 Share Posted July 11, 2007 <a href="javascript:void();"> Where is the javascript code that this relates to? I bet you that this is the cause. Quote Link to comment https://forums.phpfreaks.com/topic/58337-li-and-link/#findComment-295303 Share on other sites More sharing options...
soycharliente Posted July 11, 2007 Share Posted July 11, 2007 That function does nothing. void() doesn't do anything. It's an operator that is used to return a null value so the browser will not be able to load a new page. Quote Link to comment https://forums.phpfreaks.com/topic/58337-li-and-link/#findComment-295321 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.