I am attempting to add spacing between the li
items in my collapsible navbar
However, the issue arises when I slightly minimize the browser window, causing the navbar to collapse incorrectly. See image below:
https://i.sstatic.net/TdKb4.png
Below is the code that I have used:
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
<div class="navbar navbar-default navbar-static-top" style="padding-top:5px !important; padding-bottom:5px !important; margin-left:auto; margin-right:auto ;max-width:1135px">
<div class="container">
<a href="#" class="navbar-brand" style=""> <span style="font-weight:bold;">HELLO</span></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><a href="#" ><span style="font-weight:bold; margin:40px">choice1</span></a></li>
<li><a href="#" ><span style="font-weight:bold; margin:40px ">choice2</span></a></li>
<li><a href="#" ><span style="font-weight:bold; margin:40px ">choice3</span></a></li>
<li><a href="#" ><span style="font-weight:bold; margin:40px ">choice4</span></a></li>
<li>
<a href="#" data-toggle="dropdown" onclick="document.getElementById('form-connect').style.display=(document.getElementById('form-connect').style.display=='none')?'block':'none';">
<i class="fa fa-user hidden-xs" ></i>
<span style="font-weight:bold;">Connexion</span>
<i class="fa fa-angle-down hidden-xs"></i>
</a>
</li>
</ul>
</div>
</div>
</div>