i have a menu here. if i hover over it a sub menu drop down. but the problem is that the drop down menu display behind the div id = inner tag. i want to display front.

<div id = 'bottom_menu_wrapper'>
            <ul id='navbar'>
                <li><a href='#'>Apparel</a>
                    <ul>
                        <li><a href='#'>Female</a></li>
                        <li><a href='#'>Male</a></li>
                    </ul>
                </li>

                <li><a href='#'>Home Decor</a>
                    <ul>
                        <li><a href='#'>Furniture</a></li>
                        <li><a href='#'>Home Accessories</a></li>
                    </ul>
                </li>

                <li><a href='#'>Beauty</a>
                    <ul>
                        <li><a href='#'>Bath and Body</a></li>
                        <li><a href='#'>Hair Care</a></li>
                    </ul>
                </li>

                <li><a href='#'>Gourmet Food</a>
                    <ul>
                        <li><a href='#'>Specialty Items</a></li>
                        <li><a href='#'>Sweets</a></li>
                    </ul>
                </li>
        </div>



    <div id = 'bg_middle2'> 
        <div id = 'content'>
            <div id='inner'>
                <h1>randomstuff/h1> <img id="lock_img" src="#"/>
            </div>
        </div>
       </div>
if put div id=bottom_menu_wrapper at very end of my code than the sub menu display front of div id = inner tag. which is what i want.

is there a way to do same task without putting div id=bottom_menu_wrapper at end of my code? i dont want to switch code.

Recommended Answers

All 4 Replies

This looks like the menu I solved for you not too long ago... unless i am wrong, I am probably reading the question wrong... Can you give me a better explanation of what you desire?

You can use the z-index property to bring an element in front of another or behind another.

For example on one div assign a negative value for z-index and/or a positive value to the other div.

thanks. i didnt knew css has z-index

z-index, in my "vocab", is just layers... so becareful with them :)... I recommend you study them a bit more, they will become a pain in the rear later on... that's if you doing with a lot things on your page :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.