/ Published in: CSS
                    
                                        
Centralizar menu sem usar width
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
HTML:
<nav>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Article & Tutorials</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
CSS:
nav {
overflow: hidden;
}
nav ul{
list-style: none;
float: left;
position: relative;
left: 50%;
}
nav ul li{
float: left;
position: relative;
right: 50%;
margin: 0 1px;
}
Comments
 Subscribe to comments
                    Subscribe to comments
                
                