<div 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=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Главная</a></li>
<li><a href="#about">Портфолио</a></li>
<li><a href="#contact">Обо мне</a></li>
<li><a href="#contact">Контакт</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container"></div>
<div 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=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse text-center">
<div style="
display: inline-block;
"><ul class="nav navbar-nav">
<li class="active"><a href="#">Главная</a></li>
<li><a href="#about">Портфолио</a></li>
<li><a href="#contact">Обо мне</a></li>
<li><a href="#contact">Контакт</a></li>
</ul></div>
</div><!--/.nav-collapse -->
</div>
</div>
$(function(){
var wBrowser = document.documentElement.clientWidth;
var navbarWidth = $('.navbar-collapse').width(),
navWidth = $('.nav').width(),
navMargin = (navbarWidth/2)-(navWidth/2);
$('.nav').css('margin-left', Math.round(navMargin));
if(wBrowser < 768){
$('.nav').css('margin-left', '-15px');
}
});