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

Menu Text Align

3 Answers 57 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 1
Grant asked on 05 Aug 2014, 08:27 AM
Hi

I have a menu with text in it that I need to center align.

Problem is two of the menu items have longer text in them so I need to individually align them to the right,
but I cant do that because it conflicts with the currents css class used for all the menu items.

Grant.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 05 Aug 2014, 09:34 AM
Hi Grant,

Please try the below CSS to achieve your scenario. Try to change the margin-left based on your scenario.

CSS:
.RadMenu .rmVertical .rmItem .rmText
{
    text-align: center;
    margin-left: 10%;
}

Let me know if you have any concern.
Thanks,
Princy.
0
Grant
Top achievements
Rank 1
answered on 05 Aug 2014, 09:41 AM
Hi Princy,

Thanks for the quick response.

That didn't change anything.

My current ccs are:
.rmText
{
    text-align: center;
    line-height: 50px;
     
}

and 

.rmRootGroup .rmItem
{
    background-color: #ccc
    height: 60px;
    width: 95px
    margin: 2px
    padding-top :20px;
    line-height: 1em;
    font-size:60px;
    border-radius:5px;
     
}


0
Princy
Top achievements
Rank 1
answered on 06 Aug 2014, 03:14 AM
Hi Grant,

Please have a look into the sample code snippet which works fine at my end. Try to replicate the issue in the provided code for further help.

ASPX:
<telerik:RadMenu ID="rmenuItems" runat="server" Flow="Horizontal" Width="500px" Skin="Web20"
    Height="20px" ClickToOpen="true">
    <Items>
        <telerik:RadMenuItem Text="Main Menu">
            <Items>
                <telerik:RadMenuItem Text="Assign Scratchcards" ImageUrl="../Images/plus.gif">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="View Voucher" ImageUrl="../Images/plus.gif">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Deactivate Voucher" ImageUrl="../Images/plus.gif">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>

CSS:
.RadMenu .rmVertical .rmItem .rmText
{
    text-align: center;
    line-height: 50px;
    margin-left: 10%;
}
.rmRootGroup .rmItem
{
    background-color: #ccc;
    height: 60px;
    width: 95px;
    margin: 2px;
    padding-top: 20px;
    line-height: 1em;
    font-size: 60px;
    border-radius: 5px;
}

Thanks,
Princy.
Tags
Menu
Asked by
Grant
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Grant
Top achievements
Rank 1
Share this question
or