.group {
background: #000;
margin-left: 25px;
margin-right: 25px;
padding: 15px;
width: inherit;
white-space: nowrap;
overflow-x: auto;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.item {
margin: 3px;
background-color: #ddd;
float: left;
padding: 20px;
width: 200px;
height: 300px;
}
<div class="group">
<div class="item">
<img src="someimage1.png" alt="..." style="height:150px;">
<div>
<h5>Some Text</h5>
<p>Description</p>
</div>
</div>
<div class="item">
<img src="someimage2.png" alt="..." style="height:150px">
<div>
<h5>Some Text</h5>
<p>Description</p>
</div>
</div>
<div class="item">
<img src="someimage3.png" alt="..." style="height:150px">
<div>
<h5>Some Text</h5>
<p>Description</p>
</div>
</div>
</div>
There are three elements, but the layout is not as desired. The items are displayed on separate lines instead of one line with horizontal scrolling. It seems like the floating property is causing this issue. Removing the float:left may solve the problem, but it will also make each element appear on a different line.