Durch feste Breite und viele Einträge bricht das Menü um.
authorHolger Lindemann <hli@lx-system.de>
Tue, 14 Jul 2009 05:26:51 +0000 (07:26 +0200)
committerHolger Lindemann <hli@lx-system.de>
Tue, 14 Jul 2009 05:26:51 +0000 (07:26 +0200)
Sieht scheusslich aus. Auch sind die Untermenüs oft schlecht zu treffen.

Feste Breite entfernt, dafür seitliches Padding erhöht
Untermenüs überlappen das Hauptmenü.

bin/mozilla/menuv3.pl
css/menuv3.css

index c2fef5d..a2b2669 100644 (file)
@@ -116,7 +116,11 @@ sub print_menu {
         $html .= qq|<li><div class="x">${menu_text}</div><ul>${h}</ul></li>\n|;
       }
     } else {
+      if ($depth>1) {
+      $html .= qq|<li class='sub'>|;
+      } else {
       $html .= qq|<li>|;
+      }
       $html .= $menu->menuitem_v3(\%myconfig, $form, "${parent}$item",
                                   { "title" => $menu_title,
                                     "target" => $target });
index 5e5a93f..4068de3 100644 (file)
-body {\r
-behavior:url("css/csshover.htc");\r
-}\r
-\r
-#menu {\r
-width:99.8%;\r
-float:left;\r
-background:url(../image/bg_css_menu.png) repeat bottom;\r
-border:1px solid;\r
-border-color:#ccc #888 #555 #bbb;\r
-}\r
-\r
-#menu a, #menu h2, #menu div.x {\r
-font:11px/16px arial,helvetica,sans-serif;\r
-display:block;\r
-border:0;\r
-border-right:1px;\r
-border-style:solid;\r
-border-color:#ccc #888 #555 #bbb;\r
-white-space:nowrap;\r
-margin:0;\r
-padding:1px 0 1px 3px;\r
-}\r
-\r
-#menu h2 {\r
-color:#fff;\r
-padding:0 5px;\r
-}\r
-\r
-#menu a, #menu a:visited, #menu div.x, #menu div.x:visited {\r
-color:#000;\r
-text-decoration:none;\r
-padding-right:10px;\r
-}\r
-\r
-#menu a {\r
-background:#eee;\r
-}\r
-\r
-#menu div.x, #menu div.x:visited {\r
-background:#eee url(../image/right.gif) no-repeat right;\r
-}\r
-\r
-#menu a:hover, #menu div.x:hover {\r
-color:#a00;\r
-background-color:#ddd;\r
-}\r
-\r
-#menu a:active, #menu div.x:active {\r
-color:#060;\r
-background-color:#ccc;\r
-}\r
-\r
-#menu ul {\r
-list-style:none;\r
-margin:0;\r
-padding:0;\r
-float:left;\r
-min-width:7em;\r
-}\r
-\r
-#menu li {\r
-position:relative;\r
-float:none;\r
-border:0;\r
-}\r
-\r
-/* IE6 spacing bug fix, <li>s without a bottom border get spaced to far \r
- * correction: the bug will change the height of the parent element! this will also cause the whole menu to grow \r
- * so the only method to get this pile of crap going is to add a bottom border to the <li>s, where the enclosing <ul> already has\r
- * a bottom border, which just looks ugly\r
- * the trick: color the bottom border with the same color as the bottom pixel of the background image - noone notices */\r
-#menu ul li {\r
-border:solid;\r
-border-color:#ccd5e5;\r
-border-width:0 0 1px 0;\r
-}\r
-\r
-#menu ul ul li {\r
-border:solid;\r
-border-width:0 0 1px 0;\r
-}\r
-\r
-/* IE6 event bug fix, without a background there hovers will be occassionally lost between the li's to the layer below \r
- * causing the menu to close. Opera 9 has the same bug btw. */\r
-#menu ul ul {\r
-position:absolute;\r
-z-index:500;\r
-top:auto;\r
-display:none;\r
-background:#000;\r
-}\r
-\r
-#menu ul ul ul {\r
-top:0;\r
-left:100%;\r
-background:#000;\r
-}\r
-\r
-/* Begin non-anchor hover selectors */\r
-\r
-/* Enter the more specific element (div) selector\r
-on non-anchor hovers for IE5.x to comply with the\r
-older version of csshover.htc - V1.21.041022. It\r
-improves IE's performance speed to use the older\r
-file and this method */\r
-\r
-div#menu h2:hover {\r
-background:#A3C5FF;\r
-color:#a00;\r
-}\r
-\r
-div#menu li:hover {\r
-cursor:pointer;\r
-z-index:100;\r
-}\r
-\r
-div#menu li:hover ul ul,\r
-div#menu li li:hover ul ul,\r
-div#menu li li li:hover ul ul,\r
-div#menu li li li li:hover ul ul\r
-{display:none;}\r
-\r
-div#menu li:hover ul,\r
-div#menu li li:hover ul,\r
-div#menu li li li:hover ul,\r
-div#menu li li li li:hover ul\r
-{display:block;}\r
-\r
-/* End of non-anchor hover selectors */\r
-\r
+body {
+behavior:url("css/csshover.htc");
+}
+
+#menu {
+width:99.8%;
+float:left;
+background:url(../image/bg_css_menu.png) repeat bottom;
+border:1px solid;
+border-color:#ccc #888 #555 #bbb;
+}
+
+#menu a, #menu h2, #menu div.x {
+font:11px/16px arial,helvetica,sans-serif;
+display:block;
+border:0;
+border-right:1px;
+border-style:solid;
+border-color:#ccc #888 #555 #bbb;
+white-space:nowrap;
+margin:0;
+padding:1px 0 1px 3px;
+}
+
+#menu h2:before {
+    content:" ";
+}
+#menu h2:after {
+    content:" "; 
+}
+#menu h2 {
+color:#fff;
+padding:2 15px
+}
+
+#menu a, #menu a:visited, #menu div.x, #menu div.x:visited {
+color:#000;
+text-decoration:none;
+padding-right:10px;
+}
+
+#menu a {
+background:#eee;
+}
+#menu div.x, #menu div.x:visited {
+background:#eee url(../image/right.gif) no-repeat right;
+}
+
+#menu a:hover, #menu div.x:hover {
+color:#a00;
+background-color:#ddd;
+}
+
+#menu a:active, #menu div.x:active {
+color:#060;
+background-color:#ccc;
+}
+
+#menu ul {
+list-style:none;
+margin:0;
+padding:0;
+float:left;
+}
+
+#menu li {
+position:relative;
+float:none;
+border:0;
+}
+
+li.sub {
+position:relativ;
+left:-25px;
+top:-3px;
+}
+
+/* IE6 spacing bug fix, <li>s without a bottom border get spaced to far 
+ * correction: the bug will change the height of the parent element! this will also cause the whole menu to grow 
+ * so the only method to get this pile of crap going is to add a bottom border to the <li>s, where the enclosing <ul> already has
+ * a bottom border, which just looks ugly
+ * the trick: color the bottom border with the same color as the bottom pixel of the background image - noone notices */
+#menu ul li {
+border:solid;
+border-color:#ccd5e5;
+border-width:0 0 1px 0;
+}
+
+#menu ul ul li {
+border:solid;
+border-width:0 0 1px 0;
+}
+
+/* IE6 event bug fix, without a background there hovers will be occassionally lost between the li's to the layer below 
+ * causing the menu to close. Opera 9 has the same bug btw. */
+#menu ul ul {
+position:absolute;
+z-index:500;
+top:auto;
+display:none;
+}
+
+#menu ul ul ul {
+top:0;
+left:100%;
+}
+
+/* Begin non-anchor hover selectors */
+
+/* Enter the more specific element (div) selector
+on non-anchor hovers for IE5.x to comply with the
+older version of csshover.htc - V1.21.041022. It
+improves IE's performance speed to use the older
+file and this method */
+
+div#menu h2:hover {
+background:#A3C5FF;
+color:#a00;
+}
+
+div#menu li:hover {
+cursor:pointer;
+z-index:100;
+}
+
+div#menu li:hover ul ul,
+div#menu li li:hover ul ul,
+div#menu li li li:hover ul ul,
+div#menu li li li li:hover ul ul
+{display:none;}
+
+div#menu li:hover ul,
+div#menu li li:hover ul,
+div#menu li li li:hover ul,
+div#menu li li li li:hover ul
+{display:block; position:relativ: left:10px;}
+
+/* End of non-anchor hover selectors */
+