Cephron
Cephron

Reputation: 1587

Telerik-mvc menu: align an individual element to the right?

In an asp.net-mvc-3 project, I'm going to be using Telerik Extensions.

Right now, I'm looking at their Menu ( http://demos.telerik.com/aspnet-mvc/menu ), and wondering if one could align the last item to the far right of the bar, but leaving the rest stacked to the right.

The documentation of Menu explains how to reverse the alignment of the whole Menu, but neither it nor the MenuItem show any obvious way to control their layout.

Is this possible?

Many thanks!

Upvotes: 0

Views: 2471

Answers (1)

Simon Hazelton
Simon Hazelton

Reputation: 1255

You could add a CssClass to the last menu item and style it to to the right.

Check the .HtmlAttributes object of the menu item api.

ci.Add().Text("Categories")
  .Url(Url.Action("Categories", "ProductCategories"))
  .HtmlAttributes(new { @class="last"});

Upvotes: 3

Related Questions