I am trying to create a slideShow
the functionalty works but all the images are showing bellow each other instead of showing in one place.
this is from a Reactjs plugin, but the functionality works fine but the design/layout doesnt.
html:
<div className="slide-container">
<Fade {...fadeProperties}>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[0]} />
</div>
<h2>First Slide</h2>
</div>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[1]} />
</div>
<h2>Second Slide</h2>
</div>
<div className="each-fade">
<div className="image-container">
<img src={fadeImages[2]} />
</div>
<h2>Third Slide</h2>
</div>
</Fade>
</div>
the 3 images:
const fadeImages = [
'http://127.0.0.1:8887/SlideShow/luxury-living-room-2.jpg',
'http://127.0.0.1:8887/SlideShow/modern-chandeliers.jpg',
'http://127.0.0.1:8887/SlideShow/modern-sofa-1.jpg'
];
css:
.slide-container {
width: 70%;
margin: auto;
}
h3 {
text-align: center; }
.each-slide > div {
display: flex;
align-items: center;
justify-content: center;
background-size: cover;
height: 300px;
}
.each-slide span {
padding: 20px;
font-size: 20px;
background: #efefef;
text-align: center;
}
.each-fade {
display: flex;
}
.each-fade .image-container {
width: 75%;
overflow: hidden;
}
.each-fade .image-container img {
width: 50%;
height: 300px;
}
.each-fade h2 {
width: 25%;
display: flex;
justify-content: center;
align-items: center;
margin: 0;
background: #adceed;
}