Monday, April 18, 2011

ASP.NET Menu RTL

The ASP.NET Menu (asp:menu) has inline styles that forces left foating. You can find this out by examining the source of any page which has asp:menu tag. I don't know why this is forced, but anyway for right-to-left languages, you might need to float the menu to the right side. Now if you used tried to use float:right in the CSS, it on't apply as the inline style will overrule. To overcome this you have to modify the CSS style to the following: float:right !important;The !important keyword denotes that this style should overrule the inline style.

You will need to do the same thing in the .menu ul li style.
To let the menu items to start from the right. Otherwise you will find the last menu item comes first.

1 comment:

Muhammad Azeem said...

This is a nice article..
Its easy to understand ..
And this article is using to learn something about it..

c#, dot.net, php tutorial, Ms sql server

Thanks a lot..!
ri80