Carousel - Text Slide Background Color
-
Re: Carousel : Style Text Slides?
Hi @arminunruh,
I was wondering if there's a way to change the background color of text slides so that each carousel has a different text slide color. The code from the thread above seems to work if I want all the text slides to be the same color, but is there a way to target specific slides so that they can be all different colors?
Love the theme by the way :)
Thanks!
-
Thanks a lot extra-vitamins! :)
So you can add an html class to any element in the gridder to target it specifically with your css. right click an element and choose "set html class and id". This way you could set different colors for different carousels.
Now in the carousel, each slide has the html class of "lay-carousel-slide". Combined with the nth-child selector you can target your css to for example the second slide, third slide, etc https://developer.mozilla.org/en/docs/Web/CSS/:nth-child
For example:
.lay-carousel-slide:nth-child(2){ background-color: green; }
-
@arminunruh That worked great, thank you!!
-
This post is deleted!
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