Tagged: easy slider, enfold
Hi,
I’m using easy slider (not fullwidth) for my portfolio items.
I have an easy slider with various images in portrait and landscape (different resolutions).
I can easily fix the height of the slider to 450px with this fast CSS :
.avia-slideshow ul.avia-slideshow-inner {
height: 450px !important;
}
But the images stick to the top of the slider, how can I center these images vertically ?
To see the problem, please visit this portfolio item of my website, the second picture of the slider have a portrait ratio, i would like it to fit the slider width, but I want it to be centered vertically, of course I want to keep the original aspect ratio as I don’t want the images to be stretched.
http://naga-vision.com/index.php/fr/portfolio-item/rendus-int/
Anyway i’m really satisfied with this theme, really easy to use.
Thank you for your answer.
NB
Hey pampapic!
Please try also add the following to your code
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
and let us know if it helps
Cheers!
Basilis
Hi Basilis,
Thank your for your answer, here is my code I used to fix my problem:
.avia-slideshow ul.avia-slideshow-inner {
height: 400px !important;
}
.avia-slideshow li img {
position: absolute;
top: 400px;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}