I am trying to create a div where instead of the images inside moving to the next line it just keeps overflowing beyond the browser width.
HTML Markup:
<div class="carousel">
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
<img src="http://placehold.it/200x200"/>
</div>
CSS:
.carousel {
overflow: scroll;
overflow-x: hidden;
}
.carousel img{
display: inline-block;
}
Is there anyway to do this without setting a width to the div?