I am having issues with the customer background image on my mobile site ,it is too big

Ryanliao
New Member
2 0 0

can i get the rigt code to fix it?

20210413202501.jpg_20210413202527.jpg

 

body,
html {
background: url({{'364052861-huge.jpg' | asset_url }});

background-color: $color-body;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;

background-position:center;
background-attachment:fixed;

background-repeat: no-repeat;


}

.page-width {
@include clearfix();
max-width: $width-site;
margin: 0 auto;
}

.main-content {
display: block;
padding-top: $section-spacing-small;

@include media-query($medium-up) {
padding-top: $section-spacing;
}
}

.section-header {
margin-bottom: $section-spacing-small;

@include media-query($medium-up) {
margin-bottom: $section-spacing;
}
}

0 Likes
leungvi8
Excursionist
16 1 1

Hey there,

Try using one of the background property values: https://www.w3schools.com/cssref/css3_pr_background-size.asp (maybe contain instead of cover)

examples: https://www.w3schools.com/cssref/playit.asp?filename=playcss_background-size&preval=contain

Or if you have a url we can take a look and see.

0 Likes
Ryanliao
New Member
2 0 0

i did that before ,nothing happen ...so sad

 

0 Likes
leungvi8
Excursionist
16 1 1

do you have a link to your site?

0 Likes