This is a migrated thread and some comments may be shown as answers.
Menu and IE6.0 float:right error
2 Answers 25 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Monah Abou Hattoum
Top achievements
Rank 1
Monah Abou Hattoum asked on 17 Dec 2011, 01:12 PM
Greetings,
I tried to align a sub menu to the right
i used this on the sub menu
.HtmlAttributes(new { style = "float:right;width:120px;text-align:right;" })

wheni tested the code on IE6.0 i got a problem when i mouse over the menu, the menu didn't display as expected
the menu item wasn't on the same line as the other menus "home, profile ...etc"
also the sub menus was displayed is wrong way not under the user menu.
i checked if any css effecting this behavior

here the code i used for the menu

@(Html.Telerik().Menu()
                   .Name("menu")
                   .Orientation(MenuOrientation.Horizontal)
                   .Items(menu =>
                   {
                       menu.Add().Text("Home").Action("Index", "Home");
                       menu.Add()
                           .Text("Profile")
                           .Visible(User.Identity.IsAuthenticated)
                           .Items(items =>
                           {
                               items.Add()
                                   .Text("Personal Information")
                                   .Action("Details", "Profile");
                               items.Add()
                                   .Text("Contract History")
                                   .Action("Index", "Contract");
                               items.Add()
                                   .Text("Payslip")
                                   .Action("Index", "Payslip");
                           });
                       menu.Add()
                           .Text("Requests").Visible(User.Identity.IsAuthenticated)
                           .Items(items =>
                           {
                               items.Add().Text("Vacation Requests").Action("Index", "Vacation");
                               items.Add().Text("Transportation Requests").Action("Index", "TransportationRequest");
                               items.Add().Text("Overtime Requests").Action("Index", "Overtime");
                                
                           });
                       menu.Add()
                           .Text("Incomplete Tasks").Action("Index", "Task");
 
                       menu.Add()
                           .Text("User").Visible(User.Identity.IsAuthenticated)
                           .HtmlAttributes(new { style = "float:right;width:120px;text-align:right;" })
                           .Items(items =>
                           {
                               items.Add().Text("Sign out").Action("_LogOff", "Home");
                               items.Add().Text("Change password").Action("ChangePassword", "Home");
                           });
                   }))

i attached an image showing the case
any idea that i can use to fix this issue?

regards

2 Answers, 1 is accepted

Sort by
0
Henry
Top achievements
Rank 1
answered on 21 Feb 2012, 05:07 AM
I have the same issue.
0
Monah Abou Hattoum
Top achievements
Rank 1
answered on 15 Dec 2012, 09:22 AM
i solved it by using this
.HtmlAttributes(new { style = Request.Browser.Type == "IE7" ? "float:left;" : "float:none;" });
Tags
Menu
Asked by
Monah Abou Hattoum
Top achievements
Rank 1
Answers by
Henry
Top achievements
Rank 1
Monah Abou Hattoum
Top achievements
Rank 1
Share this question
or