|
| |
| DiCoo | Asp.Net User |
| Menu z-index problem??? | 2/16/2007 11:00:09 AM |
0/0 | |
|
Hi
Have a menu that support 5 levels. But as the image below shows the second levels UL disappears behind the first levels ULs last LI.
Below are the css I'm using, appreciate any help to fix this. And also if you can find any other errors in the css.
/Thanks
<asp:menu id="menuCategories" cssselectorclass="PC01" runat="server" />
ul.AspNet-Menu , ul.AspNet-Menu ul { margin: 0; padding: 0; display: block; }
ul.AspNet-Menu li { position: relative; list-style: none; float: left; }
ul.AspNet-Menu li a { display: block; text-decoration: none; }
ul.AspNet-Menu ul { position: absolute; visibility: hidden; }
/* Add more rules here if your menus have more than three (3) tiers */
ul.AspNet-Menu li:hover ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul, ul.AspNet-Menu li:hover ul ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul ul, ul.AspNet-Menu li:hover ul ul ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul ul ul { visibility: hidden; }
/* Add more rules here if your menus have more than three (3) tiers */
ul.AspNet-Menu li:hover ul, ul.AspNet-Menu li li:hover ul, ul.AspNet-Menu li li li:hover ul, ul.AspNet-Menu li li li li:hover ul, ul.AspNet-Menu li li li li li:hover ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li li li.AspNet-Menu-Hover ul { visibility: visible; }
.AspNet-Menu-Vertical ul.AspNet-Menu li { width: 100%; }
/* ---Design-------------*/
.PC01 .AspNet-Menu-Vertical ul.AspNet-Menu { z-index: 200; }
.PC01 ul.AspNet-Menu ul { width: 10.5em; left: 5.5em; top: -0.5em; z-index: 300; border: solid 1px #000; }
.PC01 ul.AspNet-Menu ul ul, .PC01 ul.AspNet-Menu ul ul ul, .PC01 ul.AspNet-Menu ul ul ul ul { width: 10.5em; left: 5.5em; top: -0.5em; z-index: 400; border: solid 1px #000; }
.PC01 ul.AspNet-Menu li a { height: 20px; margin-bottom:1px; padding: 7px 0 0 15px; color: #000; border-left: solid 8px #D8D5D1; background-color: #EDEDE5; }
.PC01 ul.AspNet-Menu li:hover a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover a, .PC01 ul.AspNet-Menu li:hover li:hover a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a, .PC01 ul.AspNet-Menu li:hover li:hover ul a:hover, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a:hover { border-left: solid 8px orange; background-color: #D8D5D1; }
.PC01 ul.AspNet-Menu li:hover ul a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover ul a, .PC01 ul.AspNet-Menu li:hover li:hover ul a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a { border-left: solid 8px #D8D5D1; background-color: #EDEDE5; }
Om du inte f?rst?r vad det st?r h?r s? kan du inte svenska. |
| Adam.Kahtava | Asp.Net User |
| Re: Menu z-index problem??? | 2/17/2007 2:24:11 PM |
0/0 | |
|
Could you provide a working example? It may be easier for us to debug.
-Adam Kahtava [ http://adam.kahtava.com] |
| DiCoo | Asp.Net User |
| Re: Menu z-index problem??? | 2/17/2007 5:10:04 PM |
0/0 | |
|
Here you go. It's pretty straight forward.
//.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" Inherits="TestProj.TestPage" %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> <style type="text/css"> ul.AspNet-Menu, ul.AspNet-Menu ul { margin: 0; padding: 0; display: block; }
ul.AspNet-Menu li { position: relative; list-style: none; float: left; }
ul.AspNet-Menu li a { display: block; text-decoration: none; }
ul.AspNet-Menu ul { position: absolute; visibility: hidden; }
/* Add more rules here if your menus have more than three (3) tiers */
ul.AspNet-Menu li:hover ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul, ul.AspNet-Menu li:hover ul ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul ul, ul.AspNet-Menu li:hover ul ul ul ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul ul ul ul { visibility: hidden; }
/* Add more rules here if your menus have more than three (3) tiers */
ul.AspNet-Menu li:hover ul, ul.AspNet-Menu li li:hover ul, ul.AspNet-Menu li li li:hover ul, ul.AspNet-Menu li li li li:hover ul, ul.AspNet-Menu li li li li li:hover ul, ul.AspNet-Menu li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li li.AspNet-Menu-Hover ul, ul.AspNet-Menu li li li li li.AspNet-Menu-Hover ul { visibility: visible; }
.AspNet-Menu-Vertical ul.AspNet-Menu li { width: 100%; }
/* ---Design-------------*/
.PC01 .AspNet-Menu-Vertical ul.AspNet-Menu { z-index: 200; }
.PC01 ul.AspNet-Menu ul { width: 10.5em; left: 5.5em; top: -0.5em; z-index: 300; border: solid 1px #000; }
.PC01 ul.AspNet-Menu ul ul, .PC01 ul.AspNet-Menu ul ul ul, .PC01 ul.AspNet-Menu ul ul ul ul { width: 10.5em; left: 5.5em; top: -0.5em; z-index: 400; border: solid 1px #000; }
.PC01 ul.AspNet-Menu li a { height: 20px; margin-bottom:1px; padding: 7px 0 0 15px; color: #000; border-left: solid 8px #D8D5D1; background-color: #EDEDE5; }
.PC01 ul.AspNet-Menu li:hover a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover a, .PC01 ul.AspNet-Menu li:hover li:hover a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover a, .PC01 ul.AspNet-Menu li:hover li:hover ul a:hover, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a:hover { border-left: solid 8px orange; background-color: #D8D5D1; }
.PC01 ul.AspNet-Menu li:hover ul a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover ul a, .PC01 ul.AspNet-Menu li:hover li:hover ul a, .PC01 ul.AspNet-Menu li.AspNet-Menu-Hover li.AspNet-Menu-Hover ul a { border-left: solid 8px #D8D5D1; background-color: #EDEDE5; } </style> </head>
< body> <form id="form1" runat="server"> <div style="width: 130px;"> <asp:menu id="menuCategories" cssselectorclass="PC01" runat="server" /> </div> </form> </body> </html>
----------------------------------------------------------------------------------------------------------------------------------
//.cs
using System; using System.Data; using System.Configuration; using System.Collections; using System.Collections.Generic; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls;
namespace TestProj { public partial class TestPage : System.Web.UI.Page {
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Bind(); } }
private void Bind() {
//Level 1 MenuItem m1 = new MenuItem("Level1_1", "1", "", "~/page.aspx?id=1"); MenuItem m2 = new MenuItem("Level1_2", "2", "", "~/page.aspx?id=2"); MenuItem m3 = new MenuItem("Level1_3", "3", "", "~/page.aspx?id=3"); MenuItem m4 = new MenuItem("Level1_4", "4", "", "~/page.aspx?id=4");
//Level 2 m3.ChildItems.Add(new MenuItem("Level2_1", "5", "", "~/page.aspx?id=5")); m3.ChildItems.Add(new MenuItem("Level2_2", "6", "", "~/page.aspx?id=6"));
//Level 3 m3.ChildItems[0].ChildItems.Add(new MenuItem("Level3_1", "7", "", "~/page.aspx?id=7"));
//Level 4 m3.ChildItems[0].ChildItems[0].ChildItems.Add(new MenuItem("Level4_1", "8", "", "~/page.aspx?id=8")); m3.ChildItems[0].ChildItems[0].ChildItems.Add(new MenuItem("Level4_2", "9", "", "~/page.aspx?id=9"));
//Level 5 m3.ChildItems[0].ChildItems[0].ChildItems[0].ChildItems.Add(new MenuItem("Level5_1", "10", "", "~/page.aspx?id=10")); m3.ChildItems[0].ChildItems[0].ChildItems[0].ChildItems.Add(new MenuItem("Level5_2", "11", "", "~/page.aspx?id=11")); m3.ChildItems[0].ChildItems[0].ChildItems[0].ChildItems.Add(new MenuItem("Level5_3", "12", "", "~/page.aspx?id=12"));
menuCategories.Items.Add(m1); menuCategories.Items.Add(m2); menuCategories.Items.Add(m3); menuCategories.Items.Add(m4);
} } }
Om du inte f?rst?r vad det st?r h?r s? kan du inte svenska. |
| DiCoo | Asp.Net User |
| Re: Menu z-index problem??? | 3/12/2007 10:45:41 AM |
0/0 | |
|
*bump*
Noone got a clue?
Om du inte f?rst?r vad det st?r h?r s? kan du inte svenska. |
|
| |
Free Download:
Books: Beginning Expression Web Authors: Zak Ruvalcaba, Pages: 474, Published: 2007 Pro CSS and HTML Design Patterns Authors: Michael Bowers, Pages: 494, Published: 2007 Dynamic HTML: The Definitive Reference Authors: Danny Goodman, Pages: 1307, Published: 2007 Professional CSS: Cascading Style Sheets for Web Design Authors: Christopher Schmitt, Mark Trammell, Ethan Marcotte, Dunstan Orchard, Todd Dominey, Pages: 434, Published: 2005 Zero-Dimensional Commutative Rings: Proceedings of the 1994 John H. Barrett Memorial Lectures and Conference on Commutative Ring Theory Authors: David F. Anderson, David E. Dobbs, Pages: 378, Published: 1995 Eric Meyer on CSS: Mastering the Language of Web Design Authors: Eric A. Meyer, Pages: 322, Published: 2002 Spectral Theory and Computational Methods of Sturm-Liouville Problems Authors: Don Hinton, P. W. Schaefer, Pages: 399, Published: 1997 Dreamweaver MX: Inside Macromedia Authors: Julia Pryor Belinski, Charles F. Belinski, Scott J. Wilson, Pages: 486, Published: 2002 ADO.NET Cookbook Authors: Bill Hamilton, Pages: 605, Published: 2003 Web:Drop down menu z-index problem in IE7 Jun 27, 2007 ... Drop down menu z-index problem in IE7 - Brendan Hastings, 27th June 2007 16:40. ID vs Class - Travis Killen, 27th June 2007 17:28 ... CSS Horizontal Menu: Z-Index problems with Internet Explorer Apr 19, 2006 ... CSS Horizontal Menu: Z-Index problems with Internet Explorer ... CSS Horizontal Menu: Z-Index problems with Internet Explorer - Tim Spangler ... Menu z-index problem??? - ASP.NET Forums Menu z-index problem??? Last post 03-12-2007 6:45 AM by DiCoo. 3 replies. Sort Posts:. Oldest to newest, Newest to oldest ... z-index problem in IE 6 using (DHTML Menu builder ) - CoffeeCup ... Topic Archives » z-index problem in IE 6 using (DHTML Menu builder ) ... We may be better placed to help if we can see the problem and the ... z-index problem z-index problem. Poster: mbremer Dated: Thursday July 26 2007 - 11:34:10 BST I' ve got a problem with the DHTML menu that I can't seem to fix ... anylink drop down menu & z-index problem.. - Dynamic Drive Forums anylink drop down menu & z-index problem.. Dynamic Drive scripts help. ... I tried changing the z-index on the menu, but it didn't work. ... z-index problem for css dropdown menu - HTML / CSS Forum z-index problem for css dropdown menu. Get answers to your questions in our HTML / CSS Forum forum. Randsco - z-index on a:hover elements Note: The z-index problem returns if the absolute image is inside of a relatively .... As you can imagine, the menu in IE went under the other icons. ... z-index .... problem with display... z-index .... problem with display... hi... i have menu in css and when i moving mouse over menu link it showing other links - it is working but when i have ... z-index problem Download Milonic DHTML Menu · Buy Milonic DHTML Menu · Back To Start Of Archive ... z-index problem. Poster: tomdiddle __at__ hotmail.com ... Videos: Sahrani Radio - Mr Kingsley - Interview Gone Bad *SPOOF* HI RES : http://www.vimeo.com/1958204
Sahrani Radio
http://www.armedassault.eu/SahraniRadio_frontpage/menu-id-6.html
Jerry Hopper introduces his n... How to sign up for Schthack's FREE PSO: Blue Burst server A YouTube member, JABRONIII, requested me to make a video on how to register for Schthack's servers. Using the method I have in the Guild Liminality ... Windows 95 on PSP using DOSBox (Download links included) This is Windows 95 emulating on the PSP using DOSBox, runs 3x faster than PSP Bochs. It is compatible with PSP Slim, so all PSP with official firmwar... |
|
Search This Site:
|
|