Hi @courtheye, I am happy to help you get your background styled as expected.
If you want to change the scaling and background settings for mobile and tablet devices then the best way to achieve this is by using custom CSS rules through your website’s Customizer.
Media queries are a CSS option that we can use to target only mobile and tablet screen sizes. The following code will create the media query and tell your website to only run the code contained within it at the appropriate screen sizes.
@media (max-width: 991px) {
}
Now that the Media Query is set up we can begin adding our rules to change the styling of the background image. Use the CSS selector body.custom-background
to make sure your rules only apply to the element that controls your background image.
@media (max-width: 991px) {
body.custom-background {
}
}
Now you can begin adding your rules inside of the CSS selector. Use the background-size and background-position rules to make the desired changes.
@media (max-width: 991px) {
body.custom-background {
background-size: contain;
background-position: center;
}
}
The contain setting tells your background image to only stretch as far as the screen width will allow and the entire image should be visible.
If you want to replace the background image with a solid color you can use the following rules to remove the image and set a custom color for your background area. Replace the provided hexcode with any valid color hex you think will best fit your design.
@media (max-width: 991px) {
body.custom-background {
background-image: none;
background-color: #999999;
}
}
You can also use this rule to remove the margins and padding that applied by default to your Call to Action widget and decrease the size of that area.
@media (max-width: 991px) {
.palette-primary .call-to-action {
padding: 0;
margin: 0;
}
}
I hope that CSS lets you create the design you want and please let us know if there is anything else our team can do to help!
-
This reply was modified 5 years, 3 months ago by
Joseph W.
-
This reply was modified 5 years, 3 months ago by
Joseph W.