I am trying to build a simple carousel, I know there are many out there, but I prefer to try and figure this out.
Here is my the carousel code
<div class="amnavigation">
<div class="previous"><</div>
<ul>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
<li>icon</li>
</ul>
<div class="next">></div>
</div>
and the css
.amnavigation {
height: 140px;
overflow: hidden;
display: flex;
height: 140px;
overflow: hidden;
display: flex;
max-width: 1000px;
margin: auto; }
.amnavigation ul li {
width: 140px;
height: 140px;
background: #999;
display: inline-block;
margin: 5px; }
I am not even sure where to begin with and what function to use.
would I position the inner ul in the parent container, then move that container by 140px (or whatever) left or right depending?
here is a fiddle
https://jsfiddle.net/L1v2uyxd/
ANY advice is much appreciated as is patience since am trying to learn.