You could use flexbox in div .ove
, because then the images were aligned next to each other. Just put display: flex
in the div .ove
:
.ove{
width: 100%;
overflow: auto;
display: flex; /* flexbox */
}
.ove img{
width: 600px;
/* display: inline-block;
position: relative; */
height: 300px;
}
<div class="ove">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
<img src="https://www.cleverfiles.com/howto/wp-content/uploads/2016/08/mini.jpg">
</div>
The properties you applied to the images, display: inline-block;
and position: relative;
are irrelevant. Images are already inline
by default, and change to inline-block
won’t make a difference.