This is a migrated thread and some comments may be shown as answers.

MVC Menu styling z-index issue

3 Answers 150 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phil
Top achievements
Rank 2
Phil asked on 31 May 2012, 12:54 AM
Hi All:

My MVC Menu items are underneath other controls on the page.  There is a second menu item that is below the PanelBar control.  See attached image.  I am having the same problem with Chart and Grid controls.  I am trying to put a talk together to give to two different local computer groups, but this does not look very professional.  Anybody have a solution?

Thanks for your help
Phil

3 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 31 May 2012, 08:14 AM
Hello Phil,

The Menu in your case is inside a lower stacking context, compared to the Grid. You should apply a higher z-index to the Menu, or some of its parent elements, depending on the page layout setup. The following articles provide useful information about the concepts of z-index and stacking context.

https://developer.mozilla.org/en/CSS/Understanding_z-index

All the best,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
0
Phil
Top achievements
Rank 2
answered on 02 Jun 2012, 05:49 PM
Hi Dimo:

I have not gotten it to work as of yet.  I have noticed that this is an IE problem.  Firefox does not have the problem.
My master page is as following:
<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
    @(
        Html.Telerik().StyleSheetRegistrar().DefaultGroup(group => group.Add("telerik.common.css").Add("telerik.office2010blue.css").Combined(true).Compress(true)))
    @RenderSection("HeadContent", required:false)
    <style type="text/css">
    </style
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="title"><h1>Telerik MVC Application</h1></div>
            @(Html.Telerik().Menu()
                .Name("Menu")
                .BindTo("Web")
            )
        </div>
        <div id="main">
            @RenderBody()
            <div id="footer">
            </div>
        </div>
    </div>
    @(Html.Telerik().ScriptRegistrar().DefaultGroup(group => group.Combined(true).Compress(true)))</body>
</html>
I have added the following style in the head section, but that did not work:
<style type="text/css">
    .t-menu .t-link { z-index: 10000; }
    .t-menu .t-arrow-down { z-index: 10000; }
    .t-menu .t-group { z-index: 10000; }
</style

Phil


0
Phil
Top achievements
Rank 2
answered on 03 Jun 2012, 12:48 AM
Hi:

Solved it!  I moved the Telerik menu outside of the two div tag classes and it worked.  Now I have to figure out what is causing it within page and header css classes.

Phil
Tags
Menu
Asked by
Phil
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Phil
Top achievements
Rank 2
Share this question
or