Click here to Skip to main content
15,892,768 members

CSS Problem: How to control the z-index?

Nuha IT asked:

Open original thread
Hi guys,

I have in my website a menu and down to it there is an auto-playing slider, the menu has long sub-menus, and the problem when I open the menu I cannot see the whole list of sub-menus; the moving slider hides it. It just come over the menu.
I tried to edit the CSS, the z-index attribute, but still the same problem.
I want the sub-menu over the slider.

Here is the picture:

<img>http://im24.gulfup.com/2012-07-31/1343690359371.png</img>


Here are the design code of menu

HTML
<div id="menus" style="z-index: 10px;">
        <ul class="menus">
            <li><a href="index.aspx"><span>Home</span></a></li>
            <li><a class="parent"><span>Educational Plan</span></a>
                <ul>
                    <li><a href="#" class="parent"><span>Education Faculty</span></a>
                        <ul>
                            <li><a href="#"><span>Curricula & Teaching Methods Dep.</span></a></li>
                            <li><a href="#"><span>Educational Mgmt. Supervision Dep.</span></a></li>
                            <li><a href="#"><span>Islamic Studies Dep.</span></a></li>
                            <li><a href="#"><span>Educational Mgmt. Supervision Dep.</span></a></li>
                            <li><a href="#"><span>Islamic Studies Dep.</span></a></li>
                            <li><a href="#"><span>Lingustics Dep.</span></a></li>
                            <li><a href="#"><span>Literatures Dep.</span></a></li>
                        </ul>
                    </li>
                </ul>
            </li>
        </ul>
    </div>


and this is the design code of slider

HTML
<div id="prew_img" style="z-index: 3px;">
            <ul class="round">
                <li>
                    <img src="images/header1.jpg" alt="" /></li>
                <li>
                    <img src="images/header2.jpg" alt="" /></li>
                <li>
                    <img src="images/header3.jpg" alt="" /></li>
                <li>
                    <img src="images/header4.jpg" alt="" /></li>
                <li>
                    <img src="images/header5.jpg" alt="" /></li>
                <li>
                    <img src="images/header6.jpg" alt="" /></li>
            </ul>
        </div>
Tags: CSS

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900