Title: code for navigation menu doesn&#039;t work
Last modified: August 31, 2016

---

# code for navigation menu doesn't work

 *  Resolved [debalk](https://wordpress.org/support/users/debalk/)
 * (@debalk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/)
 * Hi,
    I’m new here and hoping someone can help me out. I’m trying to build my 
   own theme following a tutorial. So far I’m enjoying it and the tutorial has been
   great, but now i’m stuck:
 * the style.css part which should put my different pages next to each other instead
   of above each other doesn’t work.
    The code looks like this:
 * ‘/* Navigation Menus */
    .site-nav ul { margin: 0; padding: 0; }
 * .site-nav ul:before, .site-nav ul:after { content: “”; display: table; }
    .site-
   nav ul:after { clear: both; } .site-nav ul { *zoom: 1; }
 * .site-nav ul li {
    list-style: none; float: left; }’
 * I’m quite sure i typed the code correctly.
    I also checked a css validator, it
   suggested that ‘*’ isn’t a valid character but I’m not sure what to do with that,
   removing it doesn’t make a difference.
 * (I’m using WordPress 4.4.2, Windows, Firefox and Notepad++)
 * Hopefully someone can help

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [paulwpxp](https://wordpress.org/support/users/paulwp/)
 * (@paulwp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/#post-7245626)
 * Just remove **float: left;**
 * and don’t worry about the validator in regard to the asterisk (*).
 *  Thread Starter [debalk](https://wordpress.org/support/users/debalk/)
 * (@debalk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/#post-7245650)
 * Thank you for the input.
    I’ve removed ‘float: left;’ but that doesn’t solve 
   it. The changes still don’t apply.
 *  [paulwpxp](https://wordpress.org/support/users/paulwp/)
 * (@paulwp)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/#post-7245666)
 * The changes don’t apply could be the caching issue, or there is some other CSS
   that has more specificity (more weight) targeting this same list. To further 
   help with inspection we need to see the real site.
 * This is the codepen of your code without float:left showing it works
    [http://codepen.io/anon/pen/JXOqwV](http://codepen.io/anon/pen/JXOqwV)
 *  Thread Starter [debalk](https://wordpress.org/support/users/debalk/)
 * (@debalk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/#post-7245686)
 * Alright! I found it!
    Thanks to your comment about targeting the same list i 
   checked out the rest of my code and found I accidentally added an underscore 
   in ‘nav class’ in header.php and footer.php. So it wasn’t exactly what you said,
   it was a mistake in my own coding, but i did find it because of your help. Thanks
   a lot!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘code for navigation menu doesn't work’ is closed to new replies.

## Tags

 * [navigation-menu](https://wordpress.org/support/topic-tag/navigation-menu/)
 * [style.css](https://wordpress.org/support/topic-tag/style-css/)

 * 4 replies
 * 2 participants
 * Last reply from: [debalk](https://wordpress.org/support/users/debalk/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/code-for-navigation-menu-doesnt-work/#post-7245686)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
