【发布时间】:2017-01-27 20:01:46
【问题描述】:
我的 Bootstrap 导航栏漂浮在 Wordpress 的中心,不知道为什么。谁能帮我这个?是因为 WordPress 还是我的样式表问题? (如果需要,将在此处更新我的代码)
STYLE.CSS
.navbar-default {
background: white;
color: black;
position: fixed;
}
.navbar-default .nav li a {
text-align: center;
}
.navbar-default .nav li a:hover,
.navbar-default .nav li a:focus {
color: #4aa5df;
outline: 0;
}
.navbar-default .navbar-nav >.active > a:hover {
color: #4aa5df;
background-color: transparent;
}
.navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:focus {
color: #777;
background: transparent;
}
.logo {
width: 190px;
height: 30px;
}
HEADER.PHP
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
</div>
在我的 html 文件上一切正常,但是当我将它放入 Wordpress 并出现这个问题时!
【问题讨论】:
-
能否附上相关的html和css?
-
@Passersby 刚刚更新了关于我的问题的代码
标签: php html css wordpress twitter-bootstrap