【问题标题】:How can I reorder the menu on mobile navbar?如何重新排序移动导航栏上的菜单?
【发布时间】:2020-12-28 16:17:04
【问题描述】:

我尝试使用 css "order: 1;" 重新排序菜单等,但我无法移动右侧的汉堡按钮。

在 wordpress 中无法编辑菜单(我只能编辑链接和徽标图像),我想我需要通过代码来完成。

网址是:https://materassibifulco.it(看手机版)

我需要将购物车图标设为最后一个,将汉堡菜单设为第一个。

非常感谢!如果您需要更多信息,请询问我

【问题讨论】:

    标签: wordpress wpbakery


    【解决方案1】:

    我已经检查了菜单是用position: absolute; 放置的,并且很难与简单的order:1; 对齐 试试这个代码它可以帮助你

    @media (max-width:767px){
       .header_mobile .octf-btn-cta {
          padding-right: 0;
          position: absolute;
          right: 0;
       }
       .mobile_logo {
          display: inline-flex;
          justify-content: center;
          width: 100%;
       }
       .mobile_logo a img {
            left: 0 !important;
        }
       .octf-header-module:nth-child(2) {
          display: none;
       }
       #mmenu_toggle {
        left: 0px;
       }
    }
    
    

    在inspector 之后这种风格looks like

    【讨论】:

    • 哦,太好了!我试图添加这么多代码来实现它。
    猜你喜欢
    • 1970-01-01
    • 2014-11-08
    • 1970-01-01
    • 2021-11-14
    • 2021-05-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多