Liebe Forumsmitglieder,
Ich möchte gerne ein Dropline-Menü in Wordpress einbauen und benutze das Starkers-Theme, ein "leeres Theme" basierend auf dem Twenty Ten Theme von Wordpress.
Den Code habe ich von hier: http://www.cssplay.co.uk/menus/pro-dropline-9.html
Mein Problem: Es funktioniert alles, bis auf die Tatsache, dass das Submenü versteckt ist. Also beim hover wird es angezeigt, aber es bleibt nicht die ganze Zeit angezeigt.
Ich möchte die individuellen Menüs unter Design - Menü´s einsetzen, da ich noch gerne den Buttons verschiedene Farben zuteilen möchte. Im Netz gibt es auch etwas, was bei mir funktioniert, aber für die verschiedenen Farben nicht auslangt, oder zumindest weiß ich nicht, wie man das anpassen müsste: http://www.darrenhoyt.com/2008/02/12/cre…n-in-wordpress/
Es wäre super, wenn mir jemand bei meinem Problem helfen könnte, ich wäre euch sehr dankbar!
Mein CCS-Code in der stlye.css fürs Menü:
#access {position:relative; font-size:12px; height:55px; width:690px; padding-left:10px;background:blue;}
#access ul {padding:0; margin:0; list-style:none; width:700px; height:35px;}
#access ul ul {padding:0; margin:0;list-style:none; width:699px; height:35px; }
#access li {float:left; height:35px; }
#access li a {float:left; display:block; padding:0 0 0 10px; height:35px; line-height:35px; color:#000; text-decoration:none; font-family:tahoma, arial, verdana, sans-serif;}
#access li a b {float:left; height:35px; display:block; padding:0 22px 0 10px; cursor:pointer; display:inline; font-weight:normal;}
#access li.current a {border-color:#fff;}
#access li.current a b { color:#9f0;}
#access li ul {position:absolute;top:35px; left:-9999px; z-index:10; }
#access li.current ul {left:0; z-index:1; border-left:1px solid #7f7f7f}
#access li a:hover { border-color:#000;cursor:pointer; }
#access li a:hover b {border-color:#000; color:#fff;}
#access li:hover > a {background-position:0 -70px; border-color:#000; cursor:pointer;}
#access li:hover > a b {background-position:100% -70px; border-color:#000; color:#fff;}
#access li.current a:hover {background-position:0 -35px; border-color:#000;}
#access li.current a:hover b {background-position:100% -35px; color:#9f0;}
#access li.current:hover a {background-position:0 -35px; border-color:#000;}
#access li.current:hover a b {background-position:100% -35px; color:#9f0;}
#access ul :hover ul {left:0; border-left:1px solid #d0d0d0;}
#access ul :hover ul.right li,
#access ul li.current ul.right li {float:right;}
#access ul :hover ul.blank {border-left:1px solid #e6e6e8;}
#access ul :hover ul li a {display:inline; padding:0 10px; margin:0; font-size:12px; width:auto; white-space:nowrap; font-weight:normal; border:0; color:#ddd; height:35px; line-height:34px;}
#access ul :hover ul.right li a {}*/
#access ul li.current ul li a,
#access li.current a:hover ul li a,
#access li.current:hover ul li a {display:inline; padding:0 10px; margin:0; font-size:12px; width:auto; white-space:nowrap; font-weight:normal; border:0; color:#aaa; height:35px; line-height:34px;}
#access ul li.current ul.right li a,
#access li.current a:hover ul.right li a,
#access li.current:hover ul.right li a {}
#access ul :hover ul li a.last,
#access ul li.current ul li a.last,
#access li.current a:hover ul li a.last,
#access li.current:hover ul li a.last {background-image:none;}
#access li ul li.current_sub a,
#access li a:hover ul li.current_sub a,
#access li:hover ul li.current_sub a,
#access li a:hover ul li a:hover,
#access li:hover ul li a:hover {color:#fff;}
#access li.current ul li.current_sub a,
#access li.current a:hover ul li.current_sub a,
#access li.current:hover ul li.current_sub a,
#access li.current a:hover ul li a:hover,
#access li.current:hover ul li a:hover {color:#9f0;}
#access ul li.current_page_item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-parent > a {
color: #fff;
}
* html #access ul li.current_page_item a,
* html #access ul li.current-menu-ancestor a,
* html #access ul li.current-menu-item a,
* html #access ul li.current-menu-parent a,
* html #access ul li a:hover {
color: #fff;
}
Alles anzeigen
Und im header.php:
<div id="access" role="navigation">
<?php /* Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
<a href="#content" title="<?php esc_attr_e( 'Skip to content', 'twentyten' ); ?>"><?php _e( 'Skip to content', 'twentyten' ); ?></a>
<?php /* Our navigation menu. If one isn't filled out, wp_nav_menu falls back to wp_page_menu. The menu assiged to the primary position is the one used. If none is assigned, the menu with the lowest ID is used. */ ?>
<?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary' ) ); ?>
</div><!-- #access -->
Version: WordPress 3.2.1.
Theme: Starkers (http://starkerstheme.com)