Log in

View Full Version : Sub menus are not visible



Chamal
11-21-2010, 06:04 AM
Hi.Every one..I am new to this forum and i m not sure whether this is the correct place to post my thread.I am developing a web site and i used jQuery Multi Level CSS Menu #2 (http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/) as my menu style..
and then i used a simple JQuery animations...
Problem is i can't access the sub menus in the menu bar.it is not visible.Only i can access the top level menus.All of the sub levels are come under the animation.
Is it the problem of JQuery or something else :confused:
How can i solve the issue.Please somebody help me.

Thanks in advance

Beverleyh
11-21-2010, 08:39 AM
It probably needs a simple z-index fix - try putting z-index:0; in the CSS for the animation and see if that helps.

For more specific help though, we need a link to the page.

Chamal
11-21-2010, 05:06 PM
Thanks Beverleyh for your reply :)

I tried that z index thing and still it doesnot work..and unfortunately i could not post a link here since i develop the site in my local machine. :(

I can post my jquery code here, since its small code and if you can check where is the error :)



<!--JqUERY IMAGE SLIDER STARTS-->
<style type="text/css">

/*** set the width and height to match your images **/

#slideshow {
position:relative;
height:100px;
width:700px;

}

#slideshow IMG {
position:absolute;

z-index:8;
/***opacity:0.0;**/
width: 900px;
height: 200px;
}

#slideshow IMG.active {
z-index:10;
/***opacity:1.0;**/
}

#slideshow IMG.last-active {
z-index:9;
}
.style1
{
text-align: right;
}
</style>

<!--iMAGE SLIDER ENDS-->

That is my Jquery code and here is the css menu bar code which i got from this site




.jqueryslidemenu{
font: bold 12px Verdana;
background: #414141;
width: 100%;
z-index:0px;
}

.jqueryslidemenu ul{
margin: 0;
padding: 0;
list-style-type: none;
z-index:0px;
}

/*Top level list items*/
.jqueryslidemenu ul li{
position: relative;
display: inline;
float: left;

}

/*Top level menu link items style*/
.jqueryslidemenu ul li a{
display: block;
background: #414141; /*background of tabs (default state)*/
color: white;
padding: 8px 10px;
border-right: 1px solid #778;
color: #2d2b2b;
text-decoration: none;

}

* html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
display: inline-block;
}

.jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{
color: white;
}

.jqueryslidemenu ul li a:hover{
background: black; /*tab link background during hover state*/
color: white;
}

/*1st sub level menu*/
.jqueryslidemenu ul li ul{
position: absolute;
left: 0;
display: block;
visibility: hidden;
overflow:visible;

}

/*Sub level menu list items (undo style from Top level List Items)*/
.jqueryslidemenu ul li ul li{
display: list-item;
float: none;
overflow:visible;

}

/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.jqueryslidemenu ul li ul li ul{
top: 0;
}

/* Sub level menu links style */
.jqueryslidemenu ul li ul li a{
font: normal 13px Verdana;
width: 160px; /*width of sub menus*/
padding: 5px;
margin: 0;
border-top-width: 0;
border-bottom: 1px solid gray;

}

.jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/
background: #eff9ff;
color: black;

}

/* ######### CSS classes applied to down and right arrow images ######### */

.downarrowclass{
position: absolute;
top: 12px;
right: 7px;
}

.rightarrowclass{
position: absolute;
top: 6px;
right: 5px;
}

As you told i put thos z-index values and still it does not work..Please can you show me a path to solve the issue...
Thanks in advance :)

bluewalrus
11-21-2010, 05:36 PM
z-index doesn't take affect unless the position property is used.

http://webdesign.about.com/cs/css/a/aazindex.htm

If you post the html of your menu you we maybe able to help more.

Beverleyh
11-22-2010, 06:19 AM
Use bluewalrus's link to read about z-index and understand the impact on layering.

You appear to have added z-index:0 to the menu though, rather than the animation as I previously said. Your slideshow has z-index values of 8 and 10 so of course its going to be over your menu if that only has a value of 0.

Chamal
11-22-2010, 02:12 PM
Thank for the reply bluewalrus :)
I m using your way to fix my issue...

Here is the html coding for the menu


<div id="myslidemenu" class="jqueryslidemenu">
<ul>
<li><a href="#">Item</a></li>
<li><a href="#">Item 2</a></li>
<li><a href="#" class="jqueryslidemenu">Folder 1</a>
<ul>
<li><a href="#">Sub Item 1.1</a></li>
<li><a href="#">Sub Item 1.2</a></li>
<li><a href="#">Sub Item 1.3</a></li>
<li><a href="#">Sub Item 1.4</a></li>
</ul>
</li>
<li><a href="#">Item 3</a></li>
<li><a href="#">Folder 2</a>
<ul>
<li><a href="#">Sub Item 2.1</a></li>
<li><a href="#">Folder 2.1</a>
<ul>
<li><a href="#">Sub Item 2.1.1</a></li>
<li><a href="#">Sub Item 2.1.2</a></li>
<li><a href="#">Folder 3.1.1</a>
<ul>
<li><a href="#">Sub Item 3.1.1.1</a></li>
<li><a href="#">Sub Item 3.1.1.2</a></li>
<li><a href="#">Sub Item 3.1.1.3</a></li>
<li><a href="#">Sub Item 3.1.1.4</a></li>
<li><a href="#">Sub Item 3.1.1.5</a></li>
</ul>
</li>
<li><a href="#">Sub Item 2.1.4</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Item 4</a></li>
</ul>
<br style="clear: left" />
</div>



One question i m having is do i need to change the z-index values in my Jquery also, or just the menu...
Thanks for your replies friends.... :)

Chamal
11-22-2010, 02:29 PM
Okey Friends....I solved my problem with your great support....Thanks Beverleyh and bluewalrus For your friendly support ....
Thanks lot Friends....
You guys are just amazing....
Keep your good works...
Thanks again and again .....THanks :) :)