Menu NOT respecting styles

2 posts, 0 answers
  1. BishMan
    BishMan avatar
    11 posts
    Member since:
    May 2013

    Posted 23 Jul 2013 Link to this post


    I am creating a menu and I am trying to get the LAST item to float right,
    as you can see in my code, I am setting the last item HTMLAttributes @class to float right but it is not repsecting that.

    What can I do to fix it.

                .Items(items =>
                        items.Add().Text("Clear Jobs")
                            .Items(i =>
                                    int days = ViewBag.LogDetailDays;
                                    i.Add().Text("Clear jobs created more than " + days + " days ago")
                                        .Action("Jobs_DeleteLast", "Jobs")
                                        .HtmlAttributes(new { onclick = "return confirm('Are you sure you want to clear jobs?');" });
                                    i.Add().Text("Clear all jobs")
                                        .Action("Jobs_DeleteAll", "Jobs")
                                        .HtmlAttributes(new { onclick = "return confirm('Are you sure you want to clear jobs?');" });
                             .HtmlAttributes(new { onclick = "refreshGrid()",
                                                   @class = "float-right",
                                                   title = AdminUI.RefreshButton_Tooltip })
  2. Dimo
    Dimo avatar
    8318 posts

    Posted 24 Jul 2013 Link to this post

    Hello Jay,

    Please make sure that the CSS rule that you are using to float the last item to the right has a high-enough specificity, so that it can override the default Kendo UI float style, which has a specificity of 0,0,3,0 (zero inline styles, zero IDs, three CSS classes, zero type selectors).

    You can easily see what conflicting styles are applied to the Menu items and which ones take precedence, by using Firebug or a similar tool to inspect the Menu HTML markup and styling.

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top