在800px屏幕宽度后显示在引导程序中的单杠

时间:2014-10-14 08:41:05

标签: css wordpress twitter-bootstrap

好的,所以我和其他100个人一样面临同样的问题,我从这里尝试了一些解决方案,但没有一个解决方案,这就是为什么要打开自己的主题。

我正在创建一个引导程序WordPress主题。导航工作正常,但当我在800像素下调整窗口大小时,会出现一个水平条[截图附件]。我如何解决它? enter image description here

我的代码来自标题:

    <div id="navigation">
    <nav class="navbar navbar-custom" role="navigation">
          <div class="container">
                <div class="row">
                      <div class="col-sm-2">
                          <div class="site-logo">
                            <a href="index.html" class="brand">Augusta</a>
                          </div>
                      </div>                          

                      <div class="col-sm-10"> 

                          <!-- Brand and toggle get grouped for better mobile display -->
                          <div class="navbar-header">
                            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
                                <i class="fa fa-bars"></i>
                            </button>
                          </div>
                          <!-- Collect the nav links, forms, and other content for toggling -->
                          <div class="collapse navbar-collapse" id="menu">
                            <?php wp_nav_menu( array( 
                            'theme_location' => 'secondary', 
                            'menu_class' => 'nav navbar-nav navbar-right', 
                            'fallback_cb' => 'false' 
                            )); ?>
                          </div>
                          <!-- /.Navbar-collapse -->

                      </div>
                </div> <!--bootstrap row end-->
          </div> <!--bootstrap container end-->
    </nav>
</div> 

&安培;我的css:

.navbar-custom {
    background-color: #252222;
    border-color: #252222;
}

.navbar-custom a.brand{
    color: #fff;
    font: 42px "bebas_neueregular";
}

.navbar {
    height: 100px;
    margin-bottom: 0;
    border-radius: 0 !important;
}

.navbar-custom .navbar-nav {
    margin-top: 25px;
}

.navbar-custom .navbar-nav > li {
    padding-left: 20px;
}

/* link */
.navbar-custom .navbar-nav > li > a {
    font: 20px "bebas_neueregular";
    color: #fff;
    transition: all 0.5s ease-in;

}

.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus {
    color: #65ba99;
    background: transparent;
}

/* mobile version */

.navbar-custom .navbar-toggle {
    border-color: #fff;
    margin-top: -70px;
}

.navbar-custom .navbar-toggle:hover,
.navbar-custom .navbar-toggle:focus {
    background-color: #65ba99;
    border-color: #87f5ca;
}

.navbar-custom .navbar-toggle .fa {
    color: #fff;
}

.navbar-custom .navbar-toggle:hover .fa,
.navbar-custom .navbar-toggle:focus .fa{
    color: #fff;
}

.navbar-collapse{overflow-x:hidden;}

@media (max-width: 767px) {

    .navbar-custom {
        height: auto;
    }

    .navbar-header {
        margin-top: 20px;
    }

}

1 个答案:

答案 0 :(得分:0)

Scrollbar即将推出,因为以下css代码:

.navbar-custom .navbar-nav > li {
    padding-left: 20px;
}

Please try this:

.navbar-custom .navbar-nav > li {
    padding-left: 0px;
}