Here's a simple CSS fix:

<!-- language: lang-css -->

    .nav { clear: both }

P.S. You can currently [reproduce this bug on Stack Overflow](http://meta.stackoverflow.com/questions/303119/css-bug-with-selected-element-in-menu-on-mobile) by switching to the mobile view, thanks to the "ten million questions" announcement.  Here's a pair of screenshots showing the SO front page with and without this fix (taken using the Firefox dev tools, in responsive design mode):

[![Screenshot of Stack Overflow mobile view with CSS bug][1]][1]
&nbsp; &nbsp;
[![Screenshot of fixed Stack Overflow mobile view][2]][2]


  [1]: https://i.sstatic.net/XeH7m.png "Without clear:both"
  [2]: https://i.sstatic.net/l6tXX.png "With clear:both"