Ticket T134953
Visible to All Users

ASPxMenu - Item text vertical alignment problem

created 11 years ago

Hi,
I have updated my devexpress from 13.1.7 to 13.2.10. I cannot vertically align the text of aspxmenu item. I checked forum and found out the following ticket;

http://www.devexpress.com/Support/Center/Question/Details/Q524973

However, i could not find a way to solve this problem. Can you create an example for to align the text of aspxmenu item vertically?

Answers approved by DevExpress Support

created 11 years ago (modified 10 years ago)

Hello Omer,

It is possible to align the item's text as follows:

  1. Assign a CSS class to the menu's items:
ASPx
<ItemStyle CssClass="alignText" />
  1. Add the following styles to the page:
CSS
.alignText > div { padding-top: 0px !important; padding-bottom: 0px !important; display: table !important; height:100%; } .alignText > div > span { display: table-cell !important; vertical-align: middle; }

Attached is a sample project.

    Show previous comments (1)
    Anthony (DevExpress Support) 11 years ago

      Omer, it is displayed exactly in the middle in my sample, see the video. It seems that some additional paddings are applied to the item in your case. Would you please modify the sample above so that it reproduces the issue?

        I realized that in firefox, it is not in the middle. I can use google chrome instead. I have the same problem with images. The images are not in the middle. How can i solve this problem?

        Anthony (DevExpress Support) 11 years ago

          Omer, I've updated the answer. As for the image, it is necessary to set padding for it manually. Attached is the modified project.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.