SharePoint:AspMenu dynamically setting width RRS feed

  • Question

  • I have a SharePoint:AspMenu that I would like to have dynamically adjust width. The design has the menu being full width of the page regardless of the number of menu items so I need it to be able to adjust dynamically as buttons are added. I can set the width manually in the css by giving a specific pixel value but that would need to be readjusted by hand any time the menu items change. I've done something similar in the past with the telerik radmenu by setting the menu item width to 100% but that doesn't work on this control. Setting the item width to 100% not only doesn't make it full width, but it causes menu items to overlap.

    Any help or even a nudge in the right direction will help.

    Mark B

    Thursday, April 28, 2011 4:12 PM


  • Hi,

    One approach is to call JavaScript to dynamically modify the width of the div element on client.

    You can add a ContentEditor web part to implement the requirement. 

    Microsoft Online Community Support
    • Proposed as answer by Chris Geier Friday, April 29, 2011 12:57 PM
    • Marked as answer by KeFang Chen Friday, May 6, 2011 2:06 AM
    Friday, April 29, 2011 8:17 AM