Skip to content

Instantly share code, notes, and snippets.

@vanaf1979
Last active January 16, 2020 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanaf1979/db965f312548062e157fdc1904eb34b0 to your computer and use it in GitHub Desktop.
Save vanaf1979/db965f312548062e157fdc1904eb34b0 to your computer and use it in GitHub Desktop.
Adding menu’s to your WordPress theme > https://since1979.dev/snippet-003-adding-menus-to-your-theme/
/**
* Add some basic styling to "header-menu".
*
* @see https://since1979.dev/snippet-003-adding-menus-to-your-theme/
*/
.menu-header-menu-container {
display: block;
/* Align menu left or right */
text-align: right;
}
.menu-header-menu-container ul {
display: inline-block;
margin: 0;
padding: 0;
list-style: none;
}
.menu-header-menu-container li {
display: inline-block;
/* Change margins if menu is left aligned */
margin: 0 0 0 10px;
padding: 0;
list-style: none;
}
.menu-header-menu-container li a {
color: #666666;
text-decoration: none;
}
/* Set hover/active states */
.menu-header-menu-container li a:hover,
.menu-header-menu-container li.current_page_item a,
.menu-header-menu-container li.current-page-ancestor a {
color: #000000;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment