June 30, 20206 yr 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.
June 30, 20206 yr Author 18 minutes ago, fisicx said: Please post the the URL of the site. It's probably a simple CSS fix. https://minche.zoposh.my/ here is the url im using max mega menu plugin to edit this menu bar and dont have much of knowledge on css
June 30, 20206 yr 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.
July 1, 20206 yr 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.
July 1, 20206 yr 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?
July 1, 20206 yr 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.
July 1, 20206 yr 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.
July 1, 20206 yr 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.
July 3, 20206 yr 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.
March 21, 20233 yr 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