Results 1 to 3 of 3

Thread: Chrome Drop Down lists not aligned properly

  1. #1
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Chrome Drop Down lists not aligned properly

    1) Script Title: Chrome CSS Drop Down Menu v2.5

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/chrome/

    3) Describe problem:

    I was able to test the functionality of this script and all looked good on my local drive.

    But when I insert the code into my page's header (using a Wordpress theme), everything looks good until you scroll over the drop down links ("services" and "portfolio"). See in the attached screenshot that the submenu appears too far to the right.

    The site's url is http://www.nectardesign.com.

    I have modified the CSS to fit my theme. Here it is below:

    Code:
    .chromestyle{
    	position: absolute;
    	right: 10px;
    	top: 27px;
    	margin-right: 5px;
        width: 490px;
    }
    
    .chromestyle ul{
    	font-size:12px;
    	margin:0;
    	padding:0;
        float: right;
    }
    
    .chromestyle ul li{
    	/* display: inline; */
    }
    
    .chromestyle ul li.page_item {
    	float:left;
    	list-style:none;
    	margin:0;
    	padding:0;
    }
    
    .chromestyle ul li a{
    	border-right:1px solid #b0b0b0;
    	color:#808080;
    	display:block;
    	margin: 0;
    	padding: 1px 8px;
    	text-transform:lowercase;
        float: left;
    }
    
    .chromestyle ul li.no_bar a{
    	border: none;
    }
    
    .chromestyle ul li a:hover {
    	color:#FE6E19;
    	text-decoration:none;
    }
    
    .chromestyle ul li.current_page_item, .chromestyle ul li.current_page_item a {
    	color: #FE6E18; /* orange */
    	text-decoration:none;
    }
    
    
    
    
    /* ######### Style for Drop Down Menu ######### */
    
    .dropmenudiv{
    position:absolute;
    top: 0;
    border: 1px solid #b0b0b0; /*THEME CHANGE HERE*/
    border-bottom-width: 0;
    font:normal 12px;
    line-height:18px;
    z-index:100;
    background-color: white;
    width: 200px;
    visibility: hidden;
    filter: progid:DXImageTransform.Microsoft.Shadow(color=#CACACA,direction=135,strength=4); /*Add Shadow in IE. Remove if desired*/
    }
    
    
    .dropmenudiv a{
    width: auto;
    display: block;
    text-indent: 3px;
    border-bottom: 1px solid #BBB; /*THEME CHANGE HERE*/
    padding: 2px 0;
    text-decoration: none;
    text-align: left;
    color:#808080;;
    }
    
    * html .dropmenudiv a{ /*IE only hack*/
    width: 100%;
    }
    
    .dropmenudiv a:hover{ /*THEME CHANGE HERE*/
    background-color: #F0F0F0;
    }
    Any help to get my submenus lined up correctly would be greatly appreciated! I like this script very much.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Most of the positioning problems with the drop down menus can be solved by making sure the HTML for the drop down DIVs themselves is outside any container tag on the page other than the BODY. So in your case, try moving all the drop down DIVs to the bottom of your page, just above the "</body>" tag:

    Code:
    <!--1st drop down menu -->                                                   
    <div id="dropmenu1" class="dropmenudiv">
    	<a href="http://www.nectardesign.com/services/3d-visualization-presentation-services/">3D Visualization</a>
    	<a href="http://www.nectardesign.com/services/branding-services/">Branding</a>
    	<a href="http://www.nectardesign.com/services/industrial-design-services/">Industrial Design</a>
    	<a href="http://www.nectardesign.com/services/engineering-services/">Mechanical Engineering</a>
    	<a href="http://www.nectardesign.com/services/project-production-management-services/">Production Management</a>
    
    	<a href="http://www.nectardesign.com/services/project-management-services/">Project Management</a>
    	<a href="http://www.nectardesign.com/services/prototype-service/">Prototype Design</a>
    	<a href="http://www.nectardesign.com/services/user-interface-services/">User Interface</a>
    </div>
    
    
    <!--2nd drop down menu -->                                                
    <div id="dropmenu2" class="dropmenudiv" style="width: 150px;">
    	<a href="http://www.nectardesign.com/category/all-products/">All Products</a>
    
    	<a href="http://www.nectardesign.com/category/consumer-products/">Consumer Products</a>
    	<a href="http://www.nectardesign.com/category/industrial-products/">Industrial Products</a>
    	<a href="http://www.nectardesign.com/category/medical-products/">Medical Products</a>
    </div>
    
    
    <script type="text/javascript">
    
    cssdropdown.startchrome("chromemenu")
    
    </script>
    
    </body>
    DD Admin

  3. #3
    Join Date
    Feb 2008
    Posts
    137
    Thanks
    18
    Thanked 2 Times in 2 Posts

    Default

    Very helpful,
    Thanks.
    ASCII stupid question, get a stupid ANSI!
    Beta is Latin for still doesn’t work.
    Mac users swear by their Mac, PC users swear at their PC.
    Keyboard not found...Press any key to continue.

Bookmarks

Posting Permissions

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