Click here to Skip to main content
16,020,877 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
i'm working on my own site, and i have twice three Divs on the Right and Left, and four Divs in Center containing Place Holders in MasterPage,

- at first div above-Left i added Menu Control that's show data from DBs Tables Dynamically at PageLoad.

- My problem is the MenuControl Main Items appears correctly but Nested Menu Items appears under div and i can't see it from right or bottom .

XML
<div class="box">
                    <div class="box_header">
                        <h2>Training Menu</h2>
                        <img class="box_icon" src="images/edutainment.png" />
                    </div><!--end box_header -->
                    <div class="box_body">

                        <asp:Menu ID="mnuTraining" runat="server">

                        </asp:Menu>

                    </div><!--end box_body -->
                    <div class="box_footer"></div><!--end box_body -->
                </div><!--end box -->


-- > CSS FILE -->

CSS
#left{
    overflow:visible;
    width:200px;
    float:left;
    min-height:200px;
    margin-right:20px;
}

.box{
    overflow:visible;
    margin-bottom:20px;
}

.box_header{
    position:relative;
    overflow:visible;
    background:url(images/box_header.png) no-repeat;
    height:30px;
    line-height:30px;
}

.box_header h2{
    color:#FFF;
    font-size:14px;
    margin-left:10px;
}

.box_header img.box_icon{
    position:absolute;
    right:5px;
    top:-10px;
}

.box_body{
    min-height:100px;
    background:#f0f0f0;
    padding:5px;
    border-left:1px solid #bfbfbf;
    border-right:1px solid #bfbfbf;
}

.box_body ul{

}

.box_body li{
    display:block;
    border-bottom:1px solid #bfbfbf;
    height:25px;
    line-height:25px;
    margin-bottom:5px;
    font-size:12px;
}

.box_body a:hover{
    color:#666;
    text-decoration:none;
}

.box_footer{
    background:url(images/bottom_curves.png) no-repeat;
    height:14px;
}
Posted

1 solution

Just tell that box to be as topmost as possible.
CSS
.subitem_box { z-order:99999; }


HTML elements load TOP-DOWN in order of apperance in the code itself.
So naturally any item that appears FIRST in the code will appear "OnTop" of other items unless you explicitly tell it not to.

Just remember that no matter how large you make your z-order of an element the drop-down list of a combo-box has a z-order of infinity (at least in IE it does) so it will always be ontop of everything all the time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



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