Skip to content

Instantly share code, notes, and snippets.

@ccabanero
Last active September 6, 2017 22:37
Show Gist options
  • Save ccabanero/2b4ce002a18a2224114177f4efbc2df9 to your computer and use it in GitHub Desktop.
Save ccabanero/2b4ce002a18a2224114177f4efbc2df9 to your computer and use it in GitHub Desktop.
category-re-order
<style>
.product-price {
display:none;
opacity: 0;
}
/* re-order categories */
.category-nav .category-nav-links {
display: -webkit-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-justify-content: space-around;
justify-content: center;
}
.category-nav-links {
-webkit-flex-direction: column;
flex-direction: column;
float: left;
}
/* note: the number of items below matches the number of categories for a page - so this will vary */
.category-nav .category-nav-links li:nth-child(3) {
order: 1;
}
.category-nav .category-nav-links li:nth-child(4) {
order: 11;
}
.category-nav .category-nav-links li:nth-child(5) {
order: 10;
}
.category-nav .category-nav-links li:nth-child(6) {
order: 5;
}
.category-nav .category-nav-links li:nth-child(7) {
order: 8;
}
.category-nav .category-nav-links li:nth-child(8) {
order: 7;
}
.category-nav .category-nav-links li:nth-child(9) {
order: 6;
}
.category-nav .category-nav-links li:nth-child(10) {
order: 9;
}
.category-nav .category-nav-links li:nth-child(11) {
order: 4;
}
@media only screen and (max-width:640px) {
.category-nav .category-nav-links {
-webkit-flex-flow: column;
flex-flow: column;
}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment