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

Centering RadMenuItems in a 100% width Radmenu

7 Answers 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 10 May 2011, 02:15 AM
Hello,

I am trying to center my RadMenuItems so that the text appears at the center of the page.  Unfortunately, everything appears left aligned even though the menu fills up the entire width of the page.  So, how do I fill up the entire width of the page while having the menuitems completely centered?

7 Answers, 1 is accepted

Sort by
0
Brett
Top achievements
Rank 1
answered on 10 May 2011, 05:03 AM
Does anybody have an answer?  I would really like to get this done tonight.  I wish there was some feature in the controls where you can just specify center and the menu items would be centered as I have seen many posts and forum topics about this one in particular and there was never a clear definitive answer.  If you could please give a clear answer on how I can get my menu items to be centered, I would greatly apprecate that.  Thank you!
0
Shinu
Top achievements
Rank 2
answered on 10 May 2011, 05:39 AM
Hello Brett,

You can easily achieve this by overriding the default CSS like below.

CSS:
.RadMenu .rmText
        {
            text-align: center !important;
        }


Thanks,
Shinu.
0
Brett
Top achievements
Rank 1
answered on 10 May 2011, 05:44 AM
How about z-index properties in case you want a graphic to overlay your RadMenu?
0
Brett
Top achievements
Rank 1
answered on 10 May 2011, 05:46 AM
Hi Shinu,

I put your code in the inline CSS in the header of my web page and this did not work.  Any other ideas on how to get this to work?  Did you get this to work on your end?
0
Shinu
Top achievements
Rank 2
answered on 10 May 2011, 06:33 AM
Hello Brett,

The above code worked as expected on my end. Could you please try with the skin name that you are using?

CSS:
.RadMenu_<skinname>  .rmText
{
 text-align: center !important;
}

Also take a look at the following help article.
CSS Skin File Selectors

Hope it helps.

Thanks,
Shinu.
0
Brett
Top achievements
Rank 1
answered on 10 May 2011, 06:49 AM
So you are saying that this should work given I choose the Vista skin?

.RadMenu_Vista

 

 

.rmText

 

{

 

 

text-align: center!important;

 

 

 

 

z-index:-1;

 

 

}



is that how it is done?
0
Shinu
Top achievements
Rank 2
answered on 10 May 2011, 02:06 PM
Hello Brett,

Normally this CSS should work.

Thanks,
Shinu.
Tags
General Discussions
Asked by
Brett
Top achievements
Rank 1
Answers by
Brett
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or