Skip to content

Instantly share code, notes, and snippets.

@sarvar
Last active February 14, 2017 07:52
Show Gist options
  • Save sarvar/30d7a0cabc8169abc74475a85c5b89e8 to your computer and use it in GitHub Desktop.
Save sarvar/30d7a0cabc8169abc74475a85c5b89e8 to your computer and use it in GitHub Desktop.
Responsive Lists Layout
<nav>
<ul>
<li><a href="home.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a></li>
<li><a href="products.html">Products</a></li>
<li><a href="jobs.html">Jobs</a></li>
<li><a href="contact.html">Contact</a></li>
<li id="x" class="x"><a href="privacy.html">Privacy</a></li>
</ul>
</nav>
/*CSS*/
nav {
background: #f0f0f0;
border: 1px solid #ccc;
border-right: none;
width: 100%;
margin-bottom: 20px;
}
nav ul {
margin: 0;
padding: 0;
}
nav {
display: table;
table-layout: fixed;
}
ul {
display: flex;
flex-direction: row;
}
ul li {
flex-grow: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment