Center the menu or 10% margin left without compromising resposivity

0

.nav-tabs {
    background-color: #ffff00;
}
.nav-tabs a {
    color: red;
}
<ul>
  <li role="presentation" class="active" ><a href="index.html">Home</a></li>
  <li role="presentation"><a href="produto.html">Produtos</a></li>
  <li role="presentation"><a href="sobre.html">Sobre</a></li>
  <li role="presentation"><a href="contato.html">Contato</a></li>
</ul>
    
asked by anonymous 18.01.2017 / 16:18

1 answer

0

The explanation and more examples are here ,

To center an element use: margin: auto;

The excerpt it showed would look like this:

.nav-tabs {
    background-color: #ffff00; 
    margin: auto;
}
.nav-tabs a {
    color: red; 
}
    
18.01.2017 / 16:40