0
I have this navbar and would like to center item 2
ul.navigation {
width: auto;
height: 40px;
position: relative;
background-color: #fcfcfc;
padding: 0;
color: #b5121b;
list-style-type: none;
box-shadow: 0 3px #ececec;
margin: 0;
z-index: 1;
}
ul.navigation > a > li {
list-style-type: none;
display: inline-block;
height: 40px !important;
padding: 10px 20px 0px 20px;
margin: 0;
max-height: 30px;
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
-o-transition-duration: 0.2s;
transition-duration: 0.2s;
}
ul.navigation > a > li:hover {
background-color: #f2f2f2;
cursor: pointer;
-webkit-transition-duration: 0.2s;
-moz-transition-duration: 0.2s;
-o-transition-duration: 0.2s;
transition-duration: 0.2s;
}
ul.navigation > a > li {
color: #b5121b;
}
<ul class="navigation">
<a href="#"><li>ITEM 1</li>
</a>
<a href="#">
<li class="center">ITEM 2</li>
</a>
<a href="#">
<li>ITEM 3</li>
</a>
</ul>
center on what ?
– MagicHat
Place in the center of the navbar, as if it were a float: center
– Bruno Antonio
The item1 has to stay left, the 2 center and the 3 right?
– Guilherme Nascimento
Item 1 is already in the right place, 2 has to stay in the center and 3 in the right (the 3 I already got, I just need to put the 2 in the center)
– Bruno Antonio