Change row background image on mobile view
Most of the time, full-width images don’t look that great on mobile view, because they are cropped (which is better than being stretched). One way to get around this is to change the background image when it reaches the mobile responsive breakpoint. Here's how.
To change the background image for a row on mobile view:
- Upload the mobile image to your media library and copy the URL for its location.
- Open the row with the background image for editing.
- Click the Advanced tab and scroll to the HTML element section (Page Builder 2.x) or the CSS selectors section (Page Builder 1.x).
- In the Class field, enter a custom class name.
It's a best practice to add a custom prefix to your class names as a namespace, to avoid conflict and identify where the class came from. In this example, we'll use the custom class name ss-changeme.
Don't use a period before the class name.
- Click Save.
- Add the CSS rule below.
See the article on where to put custom CSS code.
- Replace the class
.ss-changemein the code below with your own class, and change the URL to the one you copied in Step 1.