Answer the question
In order to leave comments, you need to log in
How to get rid of padding on the edges of the bootstrap menu?
It is necessary to lay out such a menu using bootstrap
Everything turned out except that there are indents on the right and left, please tell me how to get rid of them?
.navbar {
margin-bottom: 0;
border-radius: 0;
font-size: 18px;
border-top: 1px solid #333;
border-bottom: 1px solid #333
}
.navbar .navbar-nav {
display: inline-block;
float: none;
vertical-align: top
}
.nav a {
color: #000!important
}
.nav a:hover {
color: #989898!important
}
ul.nav>li>a {
white-space: nowrap
}
.nav-justified>li>a {
padding-top: 15px;
padding-bottom: 15px;
margin-bottom: 0;
font-weight: 700;
color: #000;
text-align: center
}
.nav>li>a:focus,
.nav>li>a:hover {
text-decoration: none;
color: #387ba7!important;
background-color: transparent!important
}
.nav-justified>.active>a,
.nav-justified>.active>a:focus,
.nav-justified>.active>a:hover {
text-decoration: none;
color: #000
}
<nav class="navbar nopadding">
<div class="container-fluid nopadding">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul id="menu-main-menu" class="nav nav-justified"><li id="menu-item-238" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-238"><a href="/">Главная</a></li>
<li id="menu-item-291" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-291"><a href="/">Услуги</a></li>
<li id="menu-item-292" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-292"><a href="/">Обо мне</a></li>
<li id="menu-item-293" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-293"><a href="/">Статьи & Видео</a></li>
<li id="menu-item-295" class="menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-295"><a href="/">Связаться со мной</a></li>
</ul> </div>
</div>
</nav>
Answer the question
In order to leave comments, you need to log in
It is from indentation 2:
.nav-justified>li:first-child a {
text-align:left;
}
.nav-justified>li:last-child a {
text-align:right;
}
It is from the indents:
.nav-justified>li>a:first-child {
text-align:left;
}
.nav-justified>li>a:last-child {
text-align:right;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question