Universal CSS Navigation Menu Support Product Page

Answered

Aligning text on button

Asked 13 Apr 2014 19:45:26
1
has this question
13 Apr 2014 19:45:26 David Hampton posted:
The text (label) on each button is aligned left. How do I align the text in the center of the button?

Replies

Replied 14 Apr 2014 08:18:36
14 Apr 2014 08:18:36 Teodor Kuduschiev replied:
Replied 14 Apr 2014 14:38:04
14 Apr 2014 14:38:04 David Hampton replied:
The article you suggested is something I had already read...and got nothing out of. I spent an entire day yesterday poring over the style sheets for the dmxnavigationmenu.css and the elegant_blue.css, experimenting and trying to figure out how to center the text inside of the buttons of a menu to no avail. The biggest problem with these style sheets is that there are no "comments" integrated into them to let a person know what elements and classes of a style sheet apply to specific parts a menu. Could you please simply tell me what class I need to alter, or what line of code refers to centering the text on a button? This is really something that should be built into the gui or at least a default setting since I have rarely seen a menu with the text aligned to the left.
thank you,
David Hampton
Replied 14 Apr 2014 14:50:48
14 Apr 2014 14:50:48 Teodor Kuduschiev replied:
AS it is explained in the article i sent you:

Main menu
.dmxNavigationMenu > ul > li > a

Sub menu
.dmxNavigationMenu ul.sub > li > a

Even by inspecting the menu code in your browser inspector/dev tools you can easily see the ul > li > a structure the navigation uses..
Replied 14 Apr 2014 15:05:41
14 Apr 2014 15:05:41 David Hampton replied:
Hi Teodor,
Please disregard my last message. I continued experimenting and finally stumbled on to how to center the text inside a menu button. For others who may have this problem here's what to do:
Find this line of code in the dmxnavigationmenu.css...
.dmxNavigationMenu * {
font-family: Arial;
font-size: 14px;
(Add this line) text-align:center !important;
color: #333;
}
Hope this helps others looking for an answer.
David Hampton

Reply to this topic