I am currently facing an issue with trying to hide floated divs within a parent div, but unfortunately my code is not working as expected. Here is the code snippet:
div.scrollarea {
overflow: scroll;
width: 400px;
float: left;
}
div.td {
float: left;
width: 100px;
height: 20px;
background-color: red;
}
Here is the HTML structure:
<div class="scrollarea">
<div class="td">x1</div>
<div class="td">x2</div>
<div class="td">x3</div>
<div class="td">x4</div>
<div class="td">x5</div>
</div>
The current output I am seeing can be viewed in the following link: https://i.sstatic.net/I0cH1.png
What I'm aiming for is to have all .td elements in the same row with a horizontal scroll appearing when needed.
Thank you.