Is there a way to align a horizontal list with a sublist in HTML and CSS? I want the menu items (Home, News, etc.) to be on one line, with submenu items below them.
HTML
<body>
<div class="menu">
<ul class="menu_list">
<li class="menu_item">
<a href="#" class="menu_link">Home</a>
<ul class="menu_sub-list">
<li class="menu_sub-item"><a href="#" class="menu_sub-link">About us</a></li>
<li class="menu_sub-item"><a href="#" class="menu_sub-link">Managment</a></li>
<li class="menu_sub-item"><a href="#" class="menu_sub-link">History</a></li>
<li class="menu_sub-item"><a href="#" class="menu_sub-link">Code of ethics</a></li>
</ul>
</li>
<li class="menu_item"><a href="#" class="menu_link">News</a></li>
<li class="menu_item"><a href="#" class="menu_link">For private
clients</a></li>
<li class="menu_item"><a href="#" class="menu_link">For corporate
clients</a></li>
<li class="menu_item"><a href="#" class="menu_link">Promo campaigns</a></li>
</ul>
</div>
</body>
CSS
.menu_sub-item {
display: inline-block;
}
.menu_item {
display: inline-block;
}