关于导航栏的东西

时间:2014-06-07 20:13:58

标签: css twitter-bootstrap navbar

有人能告诉我如何在导航栏中移动项目?我不希望我的物品与左右两侧对齐。而不是那样,我希望从双方都有所抵消。 This is one example of offset that I want.这是我的导航栏代码:

<div class = "navbar navbar-inverse navbar-static-top">
    <div class "container">
        <a href = "#" class = "navbar-brand">Dom Dom</a>

         <button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse">
            <span class = "icon-bar"></span>
            <span class = "icon-bar"></span>
            <span class = "icon-bar"></span>
         </button>

        <div class = "collapse navbar-collapse navHeaderCollapse">

            <ul class = "nav navbar-nav navbar-left">

            <li class = "active"><a href = "#">Home</a></li>
            <li><a href = "#">Blog</a></li>
            <li class = "dropdown">

                <a href = "#" class = "dropdown-toggle" data-toggle = "dropdown">Social Media <b class = "caret"></b></a>
                <ul class = "dropdown-menu">
                    <li><a href = "#">Twitter</a></li>
                    <li><a href = "#">Facebook</a></li>
                    <li><a href = "#">Google+</a></li>
                    <li><a href = "#">Instagram</a></li>
                </ul>                        
            </li>
            <li><a href = "#">About</a></li>
            <li><a href = "#">Contact</a></li>
            </ul>
            <!-- ovo su samo sign in i register gumbi-->
            <ul class = "nav navbar-nav navbar-right">
                <li><a href = "#">Sign In</a></li>
                <li><a href = "#">Register</a></li>

            </ul>
        </div>  
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

如果您指的是所有内容都具有相同的最大宽度,请将所有内容包装在内:

<div class="container">
   ...
</div>