无法在Wordpress中单击导航栏上的主页按钮(Cannot Click Home Button On Navigation Bar In Wordpress)

编程入门 行业动态 更新时间:2024-10-17 11:29:24
无法在Wordpress中单击导航栏上的主页按钮(Cannot Click Home Button On Navigation Bar In Wordpress)

当我单击导航栏上的主页按钮时,我的自定义wordpress主题无法给出任何响应,比如打开主页。 请在此链接上查看我自己的主题以获取更多信息。 它的主页按钮截图如下:

这里导航栏的css样式:

.navbar-header { position: relative; } .navbar-brand { float: left; padding: 15px 15px; font-size: 18px; line-height: 20px; height: 50px; }

我一直试图解决它,但仍然没有运气

When I click a home button on navigation bar in my custom wordpress theme cannot give any response like open the home page. Please check my own theme on this link to further info. Its home button screenshot below:

Here css style for navigation bar:

.navbar-header { position: relative; } .navbar-brand { float: left; padding: 15px 15px; font-size: 18px; line-height: 20px; height: 50px; }

I have been trying to fix it but still not luck

最满意答案

问题是div“navbar-collapse”是全宽并且位于按钮顶部。 因此,当您尝试单击按钮时,实际上会单击“navbar-collapse”。

要快速修复,您可以:

给“navbar-collapse”一个宽度并将其设置为“margin:0 auto;”。 然后它将不再覆盖您的按钮。

要么

增加“navbar-header”的z-index - > z-index 21将在你的情况下做

The problem ist that the div "navbar-collapse" is full width and sitting on top of the button. Therefore when you're trying to click the button you actually click "navbar-collapse".

For a quick fix you could:

give "navbar-collapse" a width and set it to "margin: 0 auto;". It will then no longer overlay your button.

or

increase the z-index of "navbar-header" --> z-index 21 will do in your case

更多推荐

本文发布于:2023-08-01 04:37:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1353936.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单击   按钮   栏上   主页   Wordpress

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!