Convert to a Image Carousel / Full Width Image Slider
When trying to do an edge to edge fullwidth image slider in Divi so you can use it as an Image carousel, you might run across some simple problems and below are some solutions to this issue.
The Fullwidth slider and normal slider module behave in the same way and the following methods will work on both of them.
Styling and settings common to all methods
This styles the slider how I want it, which is quite standard.
- Put an instance of the Divi `Slider`module where you want it
- Configure these settings as follows:
- Content --> Elements --> Show Arrows: No
- Content --> Elements --> Show Controls: No
- Design --> Spacing --> Padding: 0px 0px 0px 0px;
- Design --> Animation --> Automatic Animation: On
- Design --> Animation --> Automatic Animation speed: 7000 (default 7000)
- Design --> Animation --> Continue Automatic Slide on Hover: Yes
- Slide --> Content --> Text --> Title: rename to `Slide 1`
- You can also use a name like `Slide 1 - White House` if you need descriptions for your many slides.
- We will use CSS to disable this so we can keep the slides title for easier management
- Slide --> Content --> Text --> Button: remove text
- can use CSS to disable
- Slide --> Content --> Text --> Body: remove text
- can use CSS to disable
- Slide --> Content --> Background --> Colour: none
- Save the module
- Delete all slides but one
Using the Background (Lenoi's Method)
This is the simplest method and easy to do. This whole module is designed for this.
- Follow the section above called `Styling and settings common to all methods`.
- Remove the custom gutters, width + max width to 100% - and this might on be needed on the normal slider module
- Slide 1
- Put the image as the background: Slide --> Content --> Background --> Background Image
- Edit `Slide 1` as follows:
- Slide --> Content --> Background --> Background Image
- Add and additional Slide (repeat as required)
- Duplicate `Slide 1`
- Change the Title
- Slide --> Content --> Text --> Title
- Give the slide a proper name (i.e. `Slide 2` or `Slide 2 - Buckingham Palace`).
- Change the slider image
- Slide --> Content --> Background --> Background Image
- Disable Title and Content with CSS
- Only the Title needs to be disabled here as the other fields should be empty, but if not this code will hide them.
- Advanced --> Custom CSS --> Free-Form CSS --> CSS:
/* Disable Title and Content */ selector .et_pb_slide_description .et_pb_slide_title, selector .et_pb_slide_description .et_pb_slide_content { display: none; }
- Save the module
Using `Image & Video` (Divi Sensei method)
This allows you to use the slider's `Image and Video`in a full width mode using CSS code to do the magic and works for both fullwidth and the normal slider module and is based on Create a Fullwidth Image Slider using the Divi Slider Module | Divi Sensei
- Follow the section above called `Styling and settings common to all methods`.
- Edit `Slide 1`
- Set the slide image: Slide --> Content --> Image & Video --> Image
- Add an additional Slide (repeat as required)
- Duplicate `Slide 1`
- Change the Title
- Slide --> Content --> Text --> Title
- Give the slide a proper name (i.e. `Slide 2` or `Slide 2 - Buckingham Palace`).
- Change the slider image
- Slide --> Content --> Image & Video --> Image
- Apply the required CSS
- Method 1 - Global CSS
- Add this CSS to: Divi --> Theme Options --> General --> Custom CSS
/* Convert Slider module into an Image Carousel (Divi Sensei, Cleaned) - Just add .full-image-slider to your slider - Original */ .full-image-slider .et_pb_slide { padding-left: 0 !important; padding-right: 0 !important; } .full-image-slider .et_pb_slide:first-child .et_pb_slide_image img.active { animation: unset !important; } .full-image-slider .et_pb_container { max-width: 100% !important; width: 100% !important; height: auto !important; min-height: 0 !important; } .full-image-slider .et_pb_slide_image img { max-height: none !important; width: 100% !important; } .full-image-slider .et_pb_slide_image { margin: 0 !important; padding: 0 !important; top: 0 !important; position: relative !important; width: 100% !important; display: block !important; -webkit-animation-name: fade !important; -moz-animation-name: fade !important; -ms-animation-name: fade !important; -o-animation-name: fade !important; animation-name: fade !important; } .full-image-slider .et_pb_slider_container_inner { position: relative; } .full-image-slider .et_pb_slide_description { position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; } .full-image-slider .et_pb_slide_description .et_pb_button_wrapper, .full-image-slider .et_pb_slide_description .et_pb_button_wrapper a, .full-image-slider .et_pb_slide_description .et_pb_button_wrapper a:hover { width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0 !important; color: rgba(0, 0, 0, 0) !important; border: none !important; background: none !important; } .et_pb_column.et_pb_slider_fullwidth_off.full-image-slider .et_pb_slide_description .et_pb_slide_title, .et_pb_column.et_pb_slider_fullwidth_off.full-image-slider .et_pb_slide_description .et_pb_slide_content, .full-image-slider .et_pb_slide_description .et_pb_slide_title, .full-image-slider .et_pb_slide_description .et_pb_slide_content { display: none; }
- Add the following CSS class to each slider you want to transform
full-image-slider
- Add this CSS to: Divi --> Theme Options --> General --> Custom CSS
- Method 2 - Selector
- Add the following CSS to each slider module you want to transform to: Advanced --> Custom CSS --> Free-Form CSS --> CSS
/* Convert Slider module into an Image Carousel (Divi Sensei) - Adapted to use Free-Form CSS */ selector .et_pb_slide { padding-left: 0 !important; padding-right: 0 !important; } selector .et_pb_slide:first-child .et_pb_slide_image img.active { animation: unset !important; } selector .et_pb_container { max-width: 100% !important; width: 100% !important; height: auto !important; min-height: 0 !important; } selector .et_pb_slide_image img { max-height: none !important; width: 100% !important; } selector .et_pb_slide_image { margin: 0 !important; padding: 0 !important; top: 0 !important; position: relative !important; width: 100% !important; display: block !important; -webkit-animation-name: fade !important; -moz-animation-name: fade !important; -ms-animation-name: fade !important; -o-animation-name: fade !important; animation-name: fade !important; } selector .et_pb_slider_container_inner { position: relative; } selector .et_pb_slide_description { position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 0 !important; margin: 0 !important; width: auto !important; height: auto !important; } selector .et_pb_slide_description .et_pb_button_wrapper, selector .et_pb_slide_description .et_pb_button_wrapper a, selector .et_pb_slide_description .et_pb_button_wrapper a:hover { width: 100% !important; height: 100% !important; padding: 0 !important; margin: 0 !important; color: rgba(0, 0, 0, 0) !important; border: none !important; background: none !important; } selector .et_pb_slide_description .et_pb_slide_title, selector .et_pb_slide_description .et_pb_slide_content { display: none; }
- Add the following CSS to each slider module you want to transform to: Advanced --> Custom CSS --> Free-Form CSS --> CSS
- Method 1 - Global CSS
- Disable Title and Content with CSS
- This is done with the CSS code above. Edit as required
- Save the module
Notes
- Make sure you remove the background colour on each slide to stop it flashing up between images and page load. I choose transparent (i.e. none) when getting the blue background.
- My fullwidth image slider is only a thin line instead of a proper image.
- This is caused by unwanted or incorrect padding
- Fullwidth Slider --> Design --> Spacing --> padding
- Below is the default CSS for the description which is also the padding parameter of the Fullwidth slide module.
.et_pb_slide_description, .et_pb_slider_fullwidth_off .et_pb_slide_description { padding: 16% 8%; width: auto; margin: auto; }
- It is the description defaults that give the image slider its height and therefore the background and the corresponding image.
- Don't use `Padding: 0px 0px 0px 0px` as this will give you the thin line issue.
- I think this code is controlled with the slide DIV
- Below is the default CSS for the description which is also the padding parameter of the Fullwidth slide module.
- Fullwidth Slider --> Design --> Spacing --> Margin
- The is no margins by default and therefore no corresponding CSS code by default.
- When you add a margin to the slider moduel you get the following CSS code added.
.et_pb_fullwidth_slider_0_tb_header { margin-top: 471px !important; }
- This CSS code is added to the modules boubdry DIV
Code
Constant Image Size
It is best to use images of the same dimensions when making a slider but if you cannot for some reason then use the following code to make images with different sizes all display with a constant dimensions:
Advanced --> Free-Form CSS --> CSS
/* set the height of the slide image*/ selector .et_pb_slide_image img { width: auto; height: 600px; object-fit: cover; }
- Based on How To Force The Divi Gallery Slider To A Fixed Height - by Pee-Aye Creative - The Divi Gallery Slider layout can be very frustrating, but I'm here to solve that and show you how to force the Divi Gallery Slider to a fixed height!
- For aspect ratio see CSS object-fit Property | W3Schools
Custom Gallery Arrows
/* Custom Gallery Arrows */ .et-pb-arrow-prev::before { content: "4"; background-color: #24bca4; border: 1px solid #fff; border-radius: 50%; color: #fff; } .et-pb-arrow-next::before { content: "5"; background-color: #24bca4; border: 1px solid #fff; border-radius: 50%; color: #fff; }
Links
- General
- The Divi Slider Module | Elegant Themes Documentation - How to add, configure and customize the Divi slider module.
- The Divi Fullwidth Slider Module | Elegant Themes Documentation - How to add, configure and customize the Divi fullwidth slider module.
- How to Customize Your Divi Slider to Change Specific Elements with Each Slide | Elegant Themes - In this tutorial, I’m going to show you how to customize your Divi slider to change only specific elements with each slide transition. This allows you to keep the core content and design components of your slider consistent while you change only a specific element (like a single word or button) with each slide.
- Tutorials
- Create a Fullwidth Image Slider using the Divi Slider Module | divi-sensei.com - Divi is a great theme, no doubt. But sometimes the standard modules are a little bit limited in the way how you can use them. In this tutorial, we will show you how to create a fullwidth image slider in Divi.
- How to Set Up and Style Slider Module in Divi: A Step-by-Step Guide • Divi Cake Blog - In this article, I’ll walk you through all the functionalities the Divi slider offers, so you know every possible feature within the Divi Slider Module to build interactive sliders.
- How to Create a Custom Photo Gallery Slider in Divi | Elegant Themes - In this tutorial, I’m going to show you an easy way to embed Divi image galleries into your slides to create a completely custom photo gallery slider in Divi. The trick is to create a WordPress image gallery in the content area of your slider.
- How to Create a Fullscreen Slider with Divi | Elegant Themes - Creating a fullscreen slider with Divi is surprisingly easy to do. The key is to give your slider a height that is relative to the browser height and then get rid of any extra padding and width restrictions on the parent row or section. In just a few minutes, you can create a fullscreen slider that expands to fill the entire screen on page load and look great on all devices.
- How to Create a Full-Width Slider on Divi Builder - WPPagebuilders - In this article, we will show you how to create a full-width slider with Divi Builder.
- Navigation Arrows
- How to Make the Slider's Module Navigation Arrows Always Visible | Elegant Themes Help Center - Learn how to make navigation arrows in Divi’s Slider Module always visible for improved user interaction and seamless navigation.
- Trick to make Divi Slider navigation arrows always visible | TechGlimpse - This article will show you the trick of how to make the Divi slider navigation arrows visible always.
- How to change the Divi slider arrows to any icon or text - Divided Rocks - In this tutorial you will learn how to change the divi slider icon to any icon or to plain text. Without the need of a plugin, just some CSS code.
- How to change Divi slider arrows to 'Next' and 'Prev' | divibuilderaddons - In one of my Divi child themes, I wanted to change the default Divi slider arrows to something unique. So I decided to change them to text instead of arrows, to ‘Next’ and ‘Prev’. It is not possible to do it on the dashboard. So I had to find a custom solution for that. Let me show you how I achieve the result.
- DIVI Slider TUTORIAL | How to style divi slider arrow - YouTube - DIVI Slider TUTORIAL :How to style divi slider arrow. If you looking for How to style divi slider arrow? Then This video tutorial for you.
- Divi Quick Tip 11: How to Style Divi's Dot Navigation - YouTube - In this Divi Quick Tip we show you how to style the dot navigation on Divi pages and Divi sliders.