Reputation: 2975
Look at this bootstrap navbar:
<nav class="navbar navbar-default" 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="#">Brand</a>
</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">
<li class="active"><a href="#">Link</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
I want to have two links at the same time in a li
. This is what I need but is not in suitable shape. The plus icon should be beside the link text in the demo.
Upvotes: 1
Views: 2041
Reputation: 4512
I would do this:
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link</a></li>
<li class="active"><a href="#gotosite"><span class="glyphicon glyphicon-plus"></span></a></li>
</ul>
But if this doesn't fit your requirements you can use this CSS over your original code
.nav>li>a {
display: inline-block;
}
Upvotes: 2