Try Now
More in this section

Forums / Designing with Sitefinity / Adding Javascript for Control Styling

Adding Javascript for Control Styling

2 posts, 0 answered
  1. Jules
    Jules avatar
    65 posts
    20 Jul 2005
    06 Oct 2007
    Link to this post
    I'm trying to style my RadMenu in my theme so the items stretch across the menu area. How can I implement the javascript solution for this from the RadMenu help file? (http://www.telerik.com/help/aspnet/menu/menu_StretchAllMenuItems%20.html)

    How can I embed the javascript in my Theme? (I'm trying to avoid adding it to the template's masterpage.)

    Any suggestions would be VERY welcome!

  2. Pepi
    Pepi avatar
    981 posts
    20 Oct 2016
    08 Oct 2007
    Link to this post
    Hi Julia,

    You could make your own User Control, which wraps the RadMenu, and after that implement the stretching with the JavaScript function. Due to incorrect rounding, you may need to change the formula for calculating the width of each menu item in the function. This change depends on the browser that you are using and your css.

    Also, it is not necessary to embed the JavaScript. You could put it in a separate .js file and just link to it.

    Don't hesitate to contact us if you need any further assistance.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered