My problem is that when I define overflow-x:hidden
, it creates an unwanted scrollbar.
I am trying to achieve something similar to this question.
I have tried the solution suggested there but that didn't work. Below is my code:
CSS and HTML:
.wrapper {
margin-top: 50px;
}
.menu_container {
color: #333;
text-align: center;
padding: 1em;
background: #607D8B;
width: 20%;
height: 30px;
overflow-x: hidden;
}
.submenu {
background: #E0E0E0;
height: 100px;
width: 50px;
}
.menu_list {
width: 300px;
}
<body>
<div class="wrapper">
<div class="menu_container">
<div class="menu_list" align="left">
Menu 1 Menu2 Menu 3
</div>
<div class="submenu">
sub
</div>
</div>
</div>
</body>
Here is the JSFiddle link.