Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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?

    #1406816

    Hey 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,
    Ismael

    #1407051

    I 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,
    Jennifer

    #1407181

    Hi,

    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,
    Ismael

    #1407479

    Thank you, I tried that as well, and it’s still not working. Any other ideas?

    #1407673

    Hi,
    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,
    Mike

    #1408169

    Thank 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?

    #1408174

    Hi,
    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,
    Mike

    #1408474

    Hi, the mobile screens css doesn’t seem to be working. Is there a modification to the code that might work?

    Thanks,
    Jennifer

    #1408484

    Hi,

    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,
    Ismael

    #1408492

    try 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;
    }
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.