为什么我的WordPress引导程序导航栏是垂直的

时间:2016-01-11 09:25:49

标签: php html wordpress twitter-bootstrap

我想通过WordPress动态我的导航栏引导程序,但它变得垂直。我的导航栏是rtl,我想从右边开始(因为我的模板)。在下面有代码,在变为动态之后,但它是垂直的

<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="true">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">civil</a>
        </div>
        <div class="navbar-collapse collapse in" id="bs-example-navbar-collapse-1" style="float: none;" aria-expanded="true">
            <ul id="menu-main" class="nav navbar navbar-right">
                <li id="menu-item-45" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-45 dropdown"><a title="" href="#" data-toggle="dropdown" class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">home 1 <b class="caret"></b> </a>
                    <ul role="menu" class=" dropdown-menu">
                        <li id="menu-item-46" class="menu-item menu-item-type-post_type menu-item-object-post menu-item-46"><a title="" href="#">home1-1</a>
                        </li>
                        <li id="menu-item-47" class="menu-item menu-item-type-post_type menu-item-object-post menu-item-47"><a title="" href="#">home1-2</a>
                        </li>
                    </ul>
                </li>
                <li id="menu-item-48" class="menu-item menu-item-type-post_type menu-item-object-post menu-item-48"><a title="" href="#"> home2 </a>
                </li>
                <li id="menu-item-49" class="menu-item menu-item-type-post_type menu-item-object-post menu-item-49"><a title="" href="#"> home3 </a>
                </li>
            </ul>
        </div>
    </div>
</nav>

这是我的CSS:

.navbar .navbar-nav > li {
    float:right;
}
.navbar{
    padding-top:10px;
    margin-bottom:0;
}

0 个答案:

没有答案