Carousel: responsive height without changing position of captions
-
Hi,
I am searching for a way to constrain the height of the carousel to browser height without the positioning of numbers and image captions being affected, and without filling the slides. I can temporally replicate this in the browser by changing the computed paddin-bottom style on the .lay-carousel element. Am I missing something?
Any help much appreciated!
Thanks!
AnnaThis is how I would like it to look like:
-
Dear Anna @billo3D
I think i understand, apologies if i dont :)
If you are able to get the desired result by altering the .lay-carousel element, can you not add this into:
Lay Options > Custom CSS & HTML > Custom CSS
E.g
.lay-carousel{ padding-bottom:insert-desired-%-or-px-here; }
Or it must come strictly through built in options?
I think you find like i do that the Captions element, being contained within the Larger Carousel Container element means that they will move together.Talk soon & best wishes Anna :)
Richard
-
Hi Richard,
thanks so much for your quick response!
Unfortunately the CSS doesn't affect anything. I guess a built-in padding-bottom overwrites any CSS.I then tried to manipulate via javascript:
var element = document.getElementsByClassName('lay-carousel'); console.log(element[0]); element[0].style.paddingBottom = '20vh';
This overwrites the built-in function, however shifts captions and numbers
Thanks for help!!
Have a good day,
Anna
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it