Skip to content

Instantly share code, notes, and snippets.

@a-fro
Last active December 18, 2015 04:09
Show Gist options
  • Select an option

  • Save a-fro/5723631 to your computer and use it in GitHub Desktop.

Select an option

Save a-fro/5723631 to your computer and use it in GitHub Desktop.
nav ul {
width: 100%;
display: table;
aside & { // in this case, our submenu markup is in the aside
display: block;
width: 150px; }
li {
display: table-cell;
text-align: center;
aside & {
clear: left;
display: block;}
a {
display: block;
aside & {
text-align: left;}
}
}
}
/* Output*/
nav ul { width: 100%; display: table; }
aside nav ul { display: block; width: 150px; }
nav ul li { display: table-cell; text-align: center; }
aside nav ul li { clear: left; display: block; }
nav ul li a { display: block; }
aside nav ul li a { text-align: left; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment