Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

can i know how to fix the button?

Featured Replies

Hi, i have do all setting for the menu bar but it seems like there is a problem with button there where the text alignment is not centralized. I have tried many ways to fix it but still cant adjust it. Untitled12.thumb.png.193d612fb7922afbd3b5ba4034198524.png

Don't use a plugin to edit a menu.

Just use the menu that comes with the theme.

The problem you have is the the donate button has a different class to the rest of the menu.

Menu class:

mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-123

Donate class:

mega-box mega-menu-item mega-menu-item-type-post_type mega-menu-item-object-page mega-align-bottom-left mega-menu-flyout mega-menu-item-254 box

Delete the plugin and your problems will be over.

2 minutes ago, davep said:

lol more classes than a school 

The standard WordPress menu has more classes than this example, but I have also used the majority of them in certain situations before, so I'm glad they exist. If there's no styling on them it won't cause any issues, but they still remain there if you need them.

yes it's a criticism of the Word press system that it has so many classes generally applied to things, and this menu is an example of that. It seems bloated compared to hand coding stuff - does that seem a fair criticism? 

44 minutes ago, davep said:

yes it's a criticism of the Word press system that it has so many classes generally applied to things, and this menu is an example of that. It seems bloated compared to hand coding stuff - does that seem a fair criticism? 

In some areas I'd agree too many classes are used, if you create a custom theme you avoid a lot of that though. I'd say nav menus are one area where I prefer to have as many class options as possible. It doesn't really add much in terms of bloat and they add a lot of value when it comes to adjusting parts of complex nav bars. The alternative is to use CSS selectors for everything but that quickly becomes unmaintainable and brittle.

Indeed. Useful if you need them but easy to remove if you don't:

add_filter('nav_menu_css_class', 'themename_attributes_filter', 100, 1);
add_filter('nav_menu_item_id', 'themename_attributes_filter', 100, 1);

In this case, they aren't needed and are further complicated by use of the plugin.

I agree. It’s all legacy stuff hung over from the early days.

There is so much rubbish you have to clear out when configuring a theme.

But WP has earned me a bucketload of cash and continues to do so which is why I keep using it. If clients are happy to pay me I ain’t complaining.

You can align a button at the bottom of a div by using position absolute. You can try changing your css to this. If you want the button fixed at the lower right bottom, you can use position: absolute instead of fixed.

  • 2 years later...

There are a few things you can try to fix the text alignment of your menu button:

1. You  can use CSS to center the text

2. If the text is not centered because there is too much padding on one side of the button, you can adjust the padding.

3. It's possible that there is some other CSS in your code that is overriding the text alignment of your button so you can use some tools to inspect the button element and see if there are any conflicting styles.

Hope one of these solutions will help you to fix the text alignment.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.