Skip to content

Instantly share code, notes, and snippets.

@gorka
Last active December 20, 2015 03:09
Show Gist options
  • Save gorka/6061570 to your computer and use it in GitHub Desktop.
Save gorka/6061570 to your computer and use it in GitHub Desktop.
Menú con lista que ocupa todo el ancho independientemente de los elementos que contenga. - http://guiabreve.com/el-menu-perdecto-un-tip-sencillo.html
<style>
* {
margin: 0;
padding: 0;
}
ul {
width: 100%;
display: table;
table-layout: fixed; /* optional */
border: 1px solid red;
}
ul li {
display: table-cell;
width: auto;
text-align: center;
border: 1px solid black;
}
</style>
<ul id='menu'>
<li class="button"><a class='current' href='http://'>Home</a></li>
<li class="button"><a href='http://'>Products</a></li>
<li class="button"><a href='http://'>Support</a></li>
<li class="button"><a href='http://'>Contact</a></li>
<li class="button"><a href='http://'>Contact</a></li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment