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

Align RadMenu to right in div without affecting other RadMenu's on the page

1 Answer 174 Views
Menu
This is a migrated thread and some comments may be shown as answers.
rh
Top achievements
Rank 1
rh asked on 13 Aug 2009, 05:00 AM
I need to align a RadMenu to the right. The RadMenu is located in a div element. I can get it to align right with float:right but then that screws up the rest of the formatting on the page because firefox doesn't respect elements contained within a div that use float. Also, my solution needs to not affect other RadMenus that may be on the page because this is in a master page and I can't have the solution mess up RadMenu's that may be hosted in the content pages.

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 14 Aug 2009, 12:02 PM
Hi Roy,

You can use CssClass property to set the style only for this RadMenu:

<style type="text/css">   
    div.rightMenu {   
        float: right;   
    }   
</style>  

and please try "clear: both" property to fix the layout issue in Firefox:

<div>  
    <telerik:RadMenu ID="RadMenu1" runat="server" CssClass="rightMenu">  
        <Items>  
            <telerik:RadMenuItem Text="item 1" />  
            <telerik:RadMenuItem Text="item 2" />  
            <telerik:RadMenuItem Text="item 3" />  
        </Items>  
    </telerik:RadMenu>  
    <br style="clear: both" />  
 </div>  

Hope this helps.

All the best,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Menu
Asked by
rh
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or