Why does the RadMenu has a "float left"?

7 posts, 1 answers
  1. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 04 May 2011 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 04 May 2011 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 04 May 2011 Link to this post

    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
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 May 2011 Link to this post

    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.
  6. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 05 May 2011 Link to this post

    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
  7. Answer
    Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    540 posts

    Posted 09 May 2011 Link to this post

    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.

  8. mgs
    mgs avatar
    163 posts
    Member since:
    Jan 2011

    Posted 09 May 2011 Link to this post

    Thanks a lot for the answer.

    Michael G. Schneider
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017