Akbari
Akbari

Reputation: 2409

Kendo menu z-index

I want to have the menu on top of any other window. But it seems z-index isn't working. This is my menu:

@(Html.Kendo().Menu()
    .Name("menu").HtmlAttributes(new { @style = "z-index: 50;"})
    .Items(items =>
    {

And this is my DOM: enter image description here

Upvotes: 1

Views: 1945

Answers (2)

Nic
Nic

Reputation: 12875

This works for me, see example.

@(Html.Kendo().Menu()
    .HtmlAttributes(new { style = "position: relative; z-index: 11000" })
)

Upvotes: 1

jonhurlock
jonhurlock

Reputation: 1908

z-index only works on positioned elements. You have to make sure your element has one of the following explicitly declared:

  • position:absolute
  • position:relative
  • position:fixed

to allow of z-index to be enabled.

Upvotes: 1

Related Questions