How to get navigation items in a row?

Problem

I have the following code:

header {
    height: 110px;
    width: 100%;
    margin-bottom: 130px;
    position: fixed;
    top: 0;
    z-index: 11;
    /*additional styling removed*/
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    width: 78%;
    max-width: 1310px;
    height: 110px
}
nav li > a, nav li.navAside {
    display: inline-block;
    float: left;
    width: 10%;
    height: 110px;
    line-height: 110px;
    text-align: center;
    border-left: 1px solid #7a0202;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    box-sizing: border-box;
    transition: all .3s ease-in-out
}
nav li > a {
    text-transform: uppercase
}
nav li.navAside {
    width: 25%;
    user-select: text
}
nav li:last-child {
    border-right: 1px solid #7a0202
}
nav li > a:hover, nav li > a:active, #slctd {
    background-color: #880b0b
}

For devices with smaller screens I have the following styles:

@media only screen and (max-width: 1300px) {
    nav ul {
        width: 100%
    }
    nav li > a {
        width: 12.8%
    }
    .navAside {
        width: 36% !important
    }
    .navAside:first-child  {
        display: none
    }
}

And now the problematic code:

@media only screen and (max-width: 640px) {
    header {
        height: 50px;
    }    
    nav {
        width: 100%;
        height: 50px;
        white-space: nowrap;
        overflow-x: scroll;
        overflow-y: hidden;
    }
    nav ul {
        width: 100%;
        white-space: nowrap;
    }
    nav li > a {
        width: 20%;
        min-width: 100px;
        height: 50px;
        line-height: 50px
    }
    .navAside {
        display: none
    }
}

And finally, my HTML markup:

<header>
    <nav class="clearfix">
        <ul class="clearfix">
            <li class="navAside"><img src="img/logo.png" width="146" height="100" alt="Logo" style="margin-top: 4px"></li>
            <li><a href="#!" id="slctd">start</a></li>
            <li><a href="zimmer.html">zimmer</a></li>
            <li><a href="garten.html">garten</a></li>
            <li><a href="kontakt.html">kontakt</a></li>
            <li><a href="laden/">Laden</a></li>
            <li class="navAside"><p>some text</p></li>
        </ul>
    </nav>
</header>

I want to have the list items aligned in a row on mobile devices, so you can scroll horizontally. I´ve done this several times already and it worked always, except this time. I really don´t know what´s wrong with my code, maybe you can help me?

Problem courtesy of: Anselm Urban

Solution

Try adding a style for your nav ul > li for inline block in your media query:

@media only screen and (max-width: 640px) {
nav ul > li{
        display:inline-block;
    }
}

Also, add this to your media query so that the inline-block doesn't add unnecessary space:

nav ul {
    font-size:0px;
}

nav li > a {
    font-size:16px;
}

Here's a fiddle for it: http://jsfiddle.net/Mp8ws/1/

Solution courtesy of: Joe_G

Discussion

Styling the LI's themselves will guarantee better results. However, display: inline-block doesn't work consistently across userAgents. I'd suggest doing something like this:

nav li {
  height: /* your-height */;
  width: /* your-width */;
  display: block;
  float: left;
}

Hope that helps!

Discussion courtesy of: Tom Murray

I have added some css properties to nav ul.

@media only screen and (max-width: 640px) {
        header {
            height: 50px;
        }    
        nav {
            width: 100%;
            height: 50px;
            white-space: nowrap;
            overflow-x: scroll;
            overflow-y: hidden;
        }
        nav ul {
            width: 100%;
            white-space: nowrap;
            list-style: none;
            margin-left: 0;
        }
        nav li > a {
            width: 20%;`enter code here`
            min-width: 100px;
            height: 50px;
            line-height: 50px
        }
        .navAside {
            display: none
        }
    }`enter code here`
Discussion courtesy of: Gloria

This recipe can be found in it's original form on Stack Over Flow.