导航栏品牌和其他导航菜单在同一条线上

时间:2015-12-08 11:02:13

标签: html css twitter-bootstrap

我在我的应用中使用了bootstrap navbar

我想在右侧对齐brand及其他导航菜单。

<nav class="navbar navbar-default navbar-order-mgmt" role="navigation">
<div class="container-fluid">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="navbar-header">
    <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>
    <a class="navbar-brand" href="/">Order Management</a>
    <ul>
        <li>
    <a href = "#">Products</a>
    <a href = "#">Orders</a>
    <a href = "#">Expenses</a>
        </li>
    </ul>   
  </div>
  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav navbar-right">
        <li></li>
    </ul>
  </div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->

This就是我现在所拥有的。

2 个答案:

答案 0 :(得分:0)

在css中尝试此代码

def put(...):
    data['group'] = group.pk
    serializer = QuestionSerializer(data=data)
    if serializer.is_valid():
        serializer.save()
    else:
        raise serializers.ValidationError(serializer.errors)

答案 1 :(得分:0)

<ul class="nav navbar-nav">
        <li class="active"><a href="#">Home</a></li>
        <li class="dropdown">
          <a class="dropdown-toggle" data-toggle="dropdown" href="#">Page 1 <span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="#">Page 1-1</a></li>
            <li><a href="#">Page 1-2</a></li>
            <li><a href="#">Page 1-3</a></li>
          </ul>
        </li>
        <li><a href="#">Page 2</a></li>
        <li><a href="#">Page 3</a></li>
      </ul>