Note the li with child ul is display:inline
– code example as follows
<style type="text/css">
ul.nav_main li { display: inline }
ul.nav_submenu li { display: block }
</style>
<ul class="nav_main">
<li>Item 1
<ul class="nav_submenu">
<li>Option 1</li>
<li>Option 2</li>
</ul>
</li>
</ul>
CSS does not affect validity of HTML source. It may however cause unpredictable results, as the browser try their best to place a UL inside of an inline element (even though it’s valid!)
Any way, you’re always welcome to check it yourself