I have this code
.categoria-slider {
position: relative;
width: 100%;
height: 300px;
padding-left: 8%;
box-sizing: border-box;
overflow: hidden;
}
.categoria-slider .item {
float: left;
margin-left: 15px;
margin-right: 15px;
margin-top: 3%;
width: 255px;
height: 200px;
overflow: hidden;
}
.categoria-slider h1 {
font-family: "Open Sans";
font-weight: bold;
color: #000;
}
.item img {
width: 100%;
height: 100%;
}
.description {
position: relative;
width: 100%;
height: 12%;
top: -12%;
background: #29252c;
text-align: center;
}
.description a {
color: #fff;
<div class="categoria-slider">
<h1>Categorías</h1>
<div class="item">
<img src="img/categoria.jpg" alt="">
<div class="description">
<a href="#">Categoria</a>
</div>
</div>
<div class="item">
<img src="img/categoria.jpg" alt="">
<div class="description">
<a href="#">Categoria</a>
</div>
</div>
<div class="item">
<img src="img/categoria.jpg" alt="">
<div class="description">
<a href="#">Categoria</a>
</div>
</div>
<div class="item">
<img src="img/categoria.jpg" alt="">
<div class="description">
<a href="#">Categoria</a>
</div>
</div>
<div class="item">
<img src="img/categoria.jpg" alt="">
<div class="description">
<a href="#">Categoria</a>
</div>
</div>
</div>
I am trying to make a slider in such a way that if I put some arrows to the sides using jquery to the click event to give an animation with the attribute of css
position:relative;
left: -255px;
but when using the inspector I see that the fourth item is underneath only that it is not seen, but I would like it to appear on the right side and give that feeling of slide
thanks in advance