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

[Solved] Menu is not showing in proper Orientation

1 Answer 23 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.
Jean
Top achievements
Rank 1
Jean asked on 14 Apr 2012, 05:08 PM
 I folowed the instructions in registering the Menu
need to have the menu showing in Horizontal form & submenus in Vertical. see below

Also   this attrinute is causing the menu to start at 1/3 pf the page from the left
how do I make the menu goes all to the Left.

 .HtmlAttributes(new { style = "float: left};"})

_________________________________



this in head section

<head>

....
@(Html.Telerik().StyleSheetRegistrar()
.DefaultGroup(group => group
.Add("telerik.windows7.min.css")
.Add("telerik.common.min.css")
//.Add("telerik." + Html.GetCurrentTheme() + ".css")
.Combined(true)
.Compress(true)
))
@RenderSection("HeadContent", required: false)

< /Head>
< body>
<div id="menu">
@{ Html.Telerik().Menu()
.Name("menu")
.Orientation(MenuOrientation.Horizontal)
.HtmlAttributes(new { style = "float: left};"})

.Items(items =>
{

items.Add().Text("TESTA ")
.HtmlAttributes(new { style = "width:50px" })
.ImageUrl("~/Content/Icons/mvc.png")
.Url("~/Home");

items.Add().Text("TESTB ")
.HtmlAttributes(new { style = "width:50px" })
.ImageUrl("~/Content/Icons/mvc.png")
.Url("~/Home/About");
items.Add().Text("TESTC ")
.HtmlAttributes(new { style = "width:50px" })
.ImageUrl("~/Content/Icons/mvc.png")
.Url("~/Home");

items.Add().Text("TESTD ")
.HtmlAttributes(new { style = "width:50px" })
.ImageUrl("~/Content/Icons/mvc.png")
.Items(child =>
{
child.Add().Text("Test D.1 ");
child.Add().Text("Test D.2 ");
});

})

.Render();
}
</div>

@(Html.Telerik().ScriptRegistrar())

</body>
< /html>

1 Answer, 1 is accepted

Sort by
0
Jean
Top achievements
Rank 1
answered on 16 Apr 2012, 07:26 PM
I  figured it out
Tags
Menu
Asked by
Jean
Top achievements
Rank 1
Answers by
Jean
Top achievements
Rank 1
Share this question
or