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

Button Badge z-index problem

1 Answer 158 Views
Button
This is a migrated thread and some comments may be shown as answers.
AP
Top achievements
Rank 1
Iron
Iron
Veteran
AP asked on 17 Feb 2020, 02:14 PM

I have some buttons on a page, which when required, show badges containing a number. The code is:-

@(Html.Kendo().Button().Name("reviewButton").Content("Review").Badge(b => b.Value((string)ViewBag.NoToReview).Type("error").Visible((bool)ViewBag.ReviewBadge)).HtmlAttributes(new {style= "margin-right:10px;width:150px;margin-bottom:2px;" ,@class="k-primary"}).Events(e=>e.Click("review")))

 

This is fine, however I have a bootstrap 3 drop-down menu at the top of the page, and when it is shown, the button badge appears over the menu, not hidden by it.

How can I stop this happening?

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 19 Feb 2020, 09:31 AM

Hello,

The badge span element has default z-index value of 9999, whereas the Bootstrap dropdown's z-index value is 1000 (I tested it with Bootstrap v3.4.1). So to show the dropdown over the badge, either increase the dropdown's z-index value, or decrease that of the badge, e.g.:

.k-badge-overlay .k-badge {
  z-index: 999;
}

 

Regards,
Ivan Danchev
Progress Telerik

Get quickly onboarded and successful with your Telerik UI for ASP.NET MVC with the dedicated Virtual Classroom technical training, available to all active customers.
Tags
Button
Asked by
AP
Top achievements
Rank 1
Iron
Iron
Veteran
Answers by
Ivan Danchev
Telerik team
Share this question
or