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

Why does the RadMenu has a "float left"?

6 Answers 140 Views
Menu
This is a migrated thread and some comments may be shown as answers.
mgs
Top achievements
Rank 1
mgs asked on 04 May 2011, 09:31 AM
If a RadMenu is rendered, the top div has a "float: left" style. Why has Telerik chosen to do so?

I have just started to use the controls. However, when think about scenarios with the RadMenu, I believe that most of the time the RadMenu will be a block in the top of a web page. So "float: left" is more an annoyance than a benefit.

I do know that I can overrule the floating in my own CSS. I just want to understand, why the floating was chosen.

Michael G. Schneider

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 04 May 2011, 12:09 PM
Hello Michael,

The default style of the RadMenu is like this. Tha RadMenu supports right-to-left locales. If you set the dir=rtl the default style is float:Right.
As you mentioned you can easily customize the RadMenu.

Please take a look at the following documentation.
Controlling Appearance

Thanks,
Shinu.
0
mgs
Top achievements
Rank 1
answered on 04 May 2011, 03:37 PM
Hello Shinu,

thanks a lot for the answer.

I suppose you have much more experience with RadControls than I have. How do you usually use the RadMenu? Is it a block across the top of a website, or is it some area floating on the page?

If the RadMenu is used like a horizontal block, just like an ordinary div, the "float left" is not so good. Either some "clear both" has to be done after it, or the "float left" has to be overruled by project specific CSS.

Michael G. Schneider
0
Shinu
Top achievements
Rank 2
answered on 05 May 2011, 06:39 AM
Hello Michael,

Check out the following demo site which gives you the clear idea on the RadMenu and its usage.
http://demos.telerik.com/aspnet-ajax/menu/examples/overview/defaultcs.aspx

Thanks,
Shinu.
0
mgs
Top achievements
Rank 1
answered on 05 May 2011, 07:15 AM
Hello Shinu,

thanks a lot for the answer. Ok, I am a beginner with the RadControls. However, my question cannot be answered by pointing to the Telerik Demo Site. Maybe my English is not good enough, so let me rephrase my thoughts in summary.


My question is, why does the RadMenu have a "float left" anyway? Is it really needed in the majority of usage scenarios? I doubt this. So I wanted to hear something about Telerik's decision to attach a "float left" to the RadMenu. Maybe there is some "higher reason" for doing so that I fail to understand?

Michael G. Schneider
0
Accepted
Ivan Zhekov
Telerik team
answered on 09 May 2011, 11:53 AM
Hello Michael,

There is not a single concise, satisfying answer that we may give you.

Each line in the CSS file is there for a reason. From a historical point of view, those lines would tackle browser bugs in more than one way. For instance, a floated element contains it's floated elements.

The floated elements contain their floated ones; also their total width is the sum of the contained elements width and not the entire line; to name a few reason why there is a float.

I can assure you that here in Telerik we are working constantly to improve the controls in both terms of performance and ease of use. The front end teams are examining the CSS files and removing redundant CSS or updating them when possible.

Currently we can not estimate when and if we are going to drop the "float: left" line. But when we plan to do so, there will be a notification in our blogs prior the release of the Q, as this would be considered a breaking change.

If you would have any other question regarding the RadMenu, I will be happy to help you.

Best wishes,
Ivan Zhekov
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
mgs
Top achievements
Rank 1
answered on 09 May 2011, 01:17 PM
Thanks a lot for the answer.

Michael G. Schneider
Tags
Menu
Asked by
mgs
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
mgs
Top achievements
Rank 1
Ivan Zhekov
Telerik team
Share this question
or