admin管理员组文章数量:1297015
I am creating a new theme, but for some reason the menu isn't displaying correctly. I want the separator to appear next to the menu items, but they are on the next line for some reason. This is what I am getting:
This is what I get when I inspect the element:
Here is the code to display the menu:
<nav class="navbar navbar-default navbar-eaglesnest">
<?php
wp_nav_menu(array(
'theme_locatiion' => 'primary',
'container' => FALSE,
'menu_class' => 'nav navbar-nav',
'after' => '<font size=5px color=white>|</font>',
));
?>
</nav>
And here's the css:
.navbar-default {
position: absolute;
background-color: transparent;
margin: 0px;
padding: 0px;
top: 30px;
right: 20px;
z-index: 1;
border: 0px;
}
.navbar-default ul, .navbar-default li {
display: inline-block;
list-style-type: none;
list-style-image: none;
padding: 0;
}
.navbar-default ul a {
padding: 0 20px 0 20px;
line-height: 50px;
text-decoration: none;
color: white !important;
font-weight: bold;
font-size: 18px;
}
.navbar-default ul a:hover {
color: blue !important;
}
.navbar nav ul li.current-menu-item > a:link,
.navbar nav ul li.current-menu-item > a:visited,
.navbar nav ul li.current-page_ancester > a:link,
.navbar nav ul li.current-page_ancester > a:visited {
text-decoration: underline !important;
}
Any help or suggestions are appreciated.
I am creating a new theme, but for some reason the menu isn't displaying correctly. I want the separator to appear next to the menu items, but they are on the next line for some reason. This is what I am getting:
This is what I get when I inspect the element:
Here is the code to display the menu:
<nav class="navbar navbar-default navbar-eaglesnest">
<?php
wp_nav_menu(array(
'theme_locatiion' => 'primary',
'container' => FALSE,
'menu_class' => 'nav navbar-nav',
'after' => '<font size=5px color=white>|</font>',
));
?>
</nav>
And here's the css:
.navbar-default {
position: absolute;
background-color: transparent;
margin: 0px;
padding: 0px;
top: 30px;
right: 20px;
z-index: 1;
border: 0px;
}
.navbar-default ul, .navbar-default li {
display: inline-block;
list-style-type: none;
list-style-image: none;
padding: 0;
}
.navbar-default ul a {
padding: 0 20px 0 20px;
line-height: 50px;
text-decoration: none;
color: white !important;
font-weight: bold;
font-size: 18px;
}
.navbar-default ul a:hover {
color: blue !important;
}
.navbar nav ul li.current-menu-item > a:link,
.navbar nav ul li.current-menu-item > a:visited,
.navbar nav ul li.current-page_ancester > a:link,
.navbar nav ul li.current-page_ancester > a:visited {
text-decoration: underline !important;
}
Any help or suggestions are appreciated.
Share Improve this question asked Apr 7, 2021 at 18:11 Darth Mikey DDarth Mikey D 931 silver badge9 bronze badges1 Answer
Reset to default 1Try doing
.navbar-default ul, .navbar-default li {
display: flex;
list-style-type: none;
list-style-image: none;
padding: 0;
}
You may need to style the spacing a bit differently but this should make them display in one line
本文标签: themesMenu separator appearing on next line
版权声明:本文标题:themes - Menu separator appearing on next line 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741628338a2389210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论