WordPress 中的导航文本重叠

发布于 2024-12-06 15:44:51 字数 449 浏览 5 评论 0原文

我正在使用 WordPress 的白板主题。

我的导航与标题的右侧对齐,但是导航文本重叠,导航中的两种墨水在标题上相互重叠。知道为什么吗?

#nav-primary {
    clear: both;
    width: 100%;
    padding: 0 10px;
}
    #nav-primary ul,
    #nav-primary li {
        list-style: none;
    }
        #nav-primary a {
                position: absolute;
                right: 0;
                padding: 10px;
                width: auto;
                /*bottom: auto;*/

        }

Im using the whiteboard theme for wordpress.

My navigation is aligned to the right hand side of my header, however the navigation text is overlapping, the two inks in the navigation overlap each other on the header. any idea why?

#nav-primary {
    clear: both;
    width: 100%;
    padding: 0 10px;
}
    #nav-primary ul,
    #nav-primary li {
        list-style: none;
    }
        #nav-primary a {
                position: absolute;
                right: 0;
                padding: 10px;
                width: auto;
                /*bottom: auto;*/

        }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南城追梦 2024-12-13 15:44:51

尝试使用 z-index:99;或者如果您使用绝对位置,则创建一个相对 div id。

try using z-index:99; or create a relative div id if you are using position absolute.

感受沵的脚步 2024-12-13 15:44:51

看来 position:absolute 在这里对你没有任何好处。尝试删除这个。

您还可能从基本列表样式继承了不需要的样式,但如果没有看到整个 CSS 文件,我们将无法确定这一点。

It seems that position: absolute is doing you no favours here. Try removing this.

You also might be inheriting undesirable styles from your basic list style, but without seeing the whole CSS file we won't be able to determine that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文