• Resolved debalk

    (@debalk)


    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)
  • Just remove float: left;

    and don’t worry about the validator in regard to the asterisk (*).

    Thread Starter debalk

    (@debalk)

    Thank you for the input.
    I’ve removed ‘float: left;’ but that doesn’t solve it.
    The changes still don’t apply.

    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

    Thread Starter debalk

    (@debalk)

    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.