Try Now
More in this section

Forums / General Discussions / RadMenu pull-down width

RadMenu pull-down width

2 posts, 0 answered
  1. JohnGassman
    JohnGassman avatar
    18 posts
    03 Nov 2006
    09 Feb 2009
    Link to this post

    It appears that there is some client-side script that is auto-calculating widths for the pull-downs and setting inline styles for the width on the RadMenu control. We would like to be able to control this width via CSS, and are having some difficulty.

    Is there any way to "turn off" the auto-calculation on the RadMenu control? Setting 'width: 15em !important;' on the <a> tag seems to work OK in FF and IE, but Safari has the li/a tags sticking out past the containing pull-down box.

    Thank you for any suggestions!

    John Gassman
    Workstate Consulting
  2. Parvan
    Parvan avatar
    151 posts
    24 Sep 2012
    10 Feb 2009
    Link to this post
    Hi John Gassman,

    Thank you for contacting us.

    Normally RadMenu will try to resize the items according to text in them.
    If some item contains very long text, the RadMenu will increase the width of the menu item.

    But you can use the !important css directive do disallow inline css styles.

    You need to set the width property using !important directive. You need to select width which is good for you:
    #TopNavigation ul li a {     
        width:100px !important;     
    #TopNavigation ul li {     
        width:100px !important;     

    where TopNavigation is the id of html tag wrapping RadMenu(or SiteMenu in Sitefinity).
    I attached a master page in which these css styles are set and the TopNavigation element defined.
    The SiteMenu control is then dragged & dropped into the TopNavigation content place holder.

    Note: If you have defined a theme for your RadMenu, you can change styles directly into the RadMenu's theme.

    Hope this information was helpful.

    All the best,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered