In the standard WordPress theme – Twenty Twenty, words move in the multilevel menu

How do I keep the word from moving? It probably has to do with border, but I can’t figure out what needs to be changed in css or js. I tried removing all borders from the css but the word still moved. Probably need to change something in js, but I don’t know what. It needs to look like it does now, only without moving letters.

enter image description here

enter image description here

Menu php code :

<div class="menu-modal-inner modal-inner">

    <div class="menu-wrapper section-inner">

        <div class="menu-top">

            <button class="toggle close-nav-toggle fill-children-current-color" data-toggle-target=".menu-modal" data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".menu-modal">
                <span class="toggle-text"><?php _e( 'Close Menu', 'twentytwenty' ); ?></span>
                <?php twentytwenty_the_theme_svg( 'cross' ); ?>
            </button><!-- .nav-toggle -->

            <?php

            $mobile_menu_location = '';

            // If the mobile menu location is not set, use the primary and expanded locations as fallbacks, in that order.
            if ( has_nav_menu( 'mobile' ) ) {
                $mobile_menu_location = 'mobile';
            } elseif ( has_nav_menu( 'primary' ) ) {
                $mobile_menu_location = 'primary';
            } elseif ( has_nav_menu( 'expanded' ) ) {
                $mobile_menu_location = 'expanded';
            }

            if ( has_nav_menu( 'expanded' ) ) {

                $expanded_nav_classes = '';

                if ( 'expanded' === $mobile_menu_location ) {
                    $expanded_nav_classes .= ' mobile-menu';
                }

                ?>

                <nav class="expanded-menu<?php echo esc_attr( $expanded_nav_classes ); ?>" aria-label="<?php echo esc_attr_x( 'Expanded', 'menu', 'twentytwenty' ); ?>" role="navigation">

                    <ul class="modal-menu reset-list-style">
                        <?php
                        if ( has_nav_menu( 'expanded' ) ) {
                            wp_nav_menu(
                                array(
                                    'container'      => '',
                                    'items_wrap'     => '%3$s',
                                    'show_toggles'   => true,
                                    'theme_location' => 'expanded',
                                )
                            );
                        }
                        ?>
                    </ul>

                </nav>

                <?php
            }

            if ( 'expanded' !== $mobile_menu_location ) {
                ?>

                <nav class="mobile-menu" aria-label="<?php echo esc_attr_x( 'Mobile', 'menu', 'twentytwenty' ); ?>" role="navigation">

                    <ul class="modal-menu reset-list-style">

                    <?php
                    if ( $mobile_menu_location ) {

                        wp_nav_menu(
                            array(
                                'container'      => '',
                                'items_wrap'     => '%3$s',
                                'show_toggles'   => true,
                                'theme_location' => $mobile_menu_location,
                            )
                        );

                    } else {

                        wp_list_pages(
                            array(
                                'match_menu_classes' => true,
                                'show_toggles'       => true,
                                'title_li'           => false,
                                'walker'             => new TwentyTwenty_Walker_Page(),
                            )
                        );

                    }
                    ?>

                    </ul>

                </nav>

                <?php
            }
            ?>

        </div><!-- .menu-top -->

        <div class="menu-bottom">

            <?php if ( has_nav_menu( 'social' ) ) { ?>

                <nav aria-label="<?php esc_attr_e( 'Expanded Social links', 'twentytwenty' ); ?>" role="navigation">
                    <ul class="social-menu reset-list-style social-icons fill-children-current-color">

                        <?php
                        wp_nav_menu(
                            array(
                                'theme_location'  => 'social',
                                'container'       => '',
                                'container_class' => '',
                                'items_wrap'      => '%3$s',
                                'menu_id'         => '',
                                'menu_class'      => '',
                                'depth'           => 1,
                                'link_before'     => '<span class="screen-reader-text">',
                                'link_after'      => '</span>',
                                'fallback_cb'     => '',
                            )
                        );
                        ?>

                    </ul>
                </nav><!-- .social-menu -->

            <?php } ?>

        </div><!-- .menu-bottom -->

    </div><!-- .menu-wrapper -->

</div><!-- .menu-modal-inner -->

It does not fit completely, so the link to the code from the demo version of the theme.

Js code:

https://themes.getmotopress.com/2020/wp-content/themes/twentytwenty/assets/js/index.js?ver=0.0.2

Css code:

https://themes.getmotopress.com/2020/wp-content/themes/twentytwenty/style.css?ver=1.6

$299 Affordable Web Design WordPress

This article was republished from its original source.
Call Us: 1(800)730-2416

Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.

FREE Drupal SEO Audit

Test your site below to see which issues need to be fixed. We will fix them and optimize your Drupal site 100% for Google and Bing. (Allow 30-60 seconds to gather data.)

Powered by

In the standard WordPress theme – Twenty Twenty, words move in the multilevel menu

On-Site Drupal SEO Master Setup

We make sure your site is 100% optimized (and stays that way) for the best SEO results.

With Pixeldust On-site (or On-page) SEO we make changes to your site’s structure and performance to make it easier for search engines to see and understand your site’s content. Search engines use algorithms to rank sites by degrees of relevance. Our on-site optimization ensures your site is configured to provide information in a way that meets Google and Bing standards for optimal indexing.

This service includes:

  • Pathauto install and configuration for SEO-friendly URLs.
  • Meta Tags install and configuration with dynamic tokens for meta titles and descriptions for all content types.
  • Install and fix all issues on the SEO checklist module.
  • Install and configure XML sitemap module and submit sitemaps.
  • Install and configure Google Analytics Module.
  • Install and configure Yoast.
  • Install and configure the Advanced Aggregation module to improve performance by minifying and merging CSS and JS.
  • Install and configure Schema.org Metatag.
  • Configure robots.txt.
  • Google Search Console setup snd configuration.
  • Find & Fix H1 tags.
  • Find and fix duplicate/missing meta descriptions.
  • Find and fix duplicate title tags.
  • Improve title, meta tags, and site descriptions.
  • Optimize images for better search engine optimization. Automate where possible.
  • Find and fix the missing alt and title tag for all images. Automate where possible.
  • The project takes 1 week to complete.