-
AuthorPosts
-
May 8, 2023 at 4:12 pm #1406761
Is it possible to add a background color to the full width easy slider using css? If so, what would be the css code for that?
May 9, 2023 at 4:12 am #1406816Hey jenniferh73,
Thank you for the inquiry.
By default, there is no option to apply background color to the slides, but you can achieve this using CSS.
Here’s an example:
Example:
.avia-slideshow li:nth-child(1) { background-color: red; } .avia-slideshow li:nth-child(2) { background-color: blue; }
This CSS code will apply a red background to the first slide and a blue background to the second slide. You can modify the colors and slide number as per your requirement. You may need to apply a custom css class name or ID to the slideshow element.
// https://kriesi.at/documentation/enfold/add-custom-css/#enable-custom-css-class-name-support
Best regards,
IsmaelMay 10, 2023 at 10:00 pm #1407051I tried this method and it doesn’t seem to be working. My goal is to hide the white screen that flashes for a second while the slider is loading. Is there a better way to achieve this?
Thanks,
JenniferMay 12, 2023 at 5:59 am #1407181Hi,
Thank you for the update.
You may need to disable the file compression option in the Siteground plugin for the changes to take effect. If you want to set the same background color for all slides, you can use the following CSS code
.avia-slideshow li { background: red; }
Best regards,
IsmaelMay 15, 2023 at 7:42 pm #1407479Thank you, I tried that as well, and it’s still not working. Any other ideas?
May 16, 2023 at 11:51 pm #1407673Hi,
Thank you for your patience, try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field:#top.home #full_slider_1 { background: #000; }
This will show the background color black until the image in the slider loads.
Or you can use the image of the first slide so you don’t see any delay in the slider loading:#top.home #full_slider_1 { background-image: url(https://bastiontechnologies.com/wp-content/uploads/2023/02/slider-systems-engineering-1000x375-1.jpg); background-size: contain; background-repeat: no-repeat; }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 22, 2023 at 5:45 pm #1408169Thank you, the CSS you suggested using the background image works well on full size screens. However, when viewing on smaller screens the size of the background image doesn’t match the corresponding slider image. Can you please provide additional CSS to accommodate smaller screens?
May 22, 2023 at 6:28 pm #1408174Hi,
Thanks for the feedback, for mobile screens try adding this css:@media only screen and (max-width: 767px) { #top.home #main #full_slider_1 { background-image: url(https://bastiontechnologies.com/wp-content/uploads/2023/02/slider-systems-engineering-1000x375-1.jpg); background-size: cover; background-position-x: center; background-repeat: no-repeat; } }
After applying the css, please clear your browser cache and check.
Best regards,
MikeMay 24, 2023 at 10:47 pm #1408474Hi, the mobile screens css doesn’t seem to be working. Is there a modification to the code that might work?
Thanks,
JenniferMay 25, 2023 at 6:08 am #1408484Hi,
The CSS modification is not being successfully applied to the slider. To resolve this issue, please follow these steps:
1.) Remove the previous CSS code that you added.
2.) Visit this thread in the forum.
3.) Copy the CSS code directly from the forum or thread.
4.) Paste the code in the Quick CSS field, or in the child theme’s style.css file.
5.) Save the changes and refresh the page to see if the CSS modifications take effect on the slider.By directly copying the CSS code from the original source, you can ensure that no formatting or syntax issues are introduced. If you encounter any further difficulties or have additional questions, please let us know. We’re here to assist you.
Best regards,
IsmaelMay 25, 2023 at 7:35 am #1408492try to set the ul background – it is hard to test on developer tools because there is a reload needed to see it.
#top .avia-slideshow-inner { background-color: #000; }
if you need a background-image on that use:
#top .avia-slideshow-inner { background-image: url(https://bastiontechnologies.com/wp-content/uploads/2023/02/slider-systems-engineering-1000x375-1.jpg); background-size: cover; background-repeat: no-repeat; background-position: top left; background-color: #000; }
-
AuthorPosts
- You must be logged in to reply to this topic.