CMS Development

randymalmquist
Member

background Image is repeating incorrectly

SOLVE

Hello, on a landing page the background image settings are set to 100% and all other directions have been follwed but it is still repeating, causing it to be cutoff by the desktop version on the right side, see below

GDPR.JPG

0 Upvotes
2 Accepted solutions
tjoyce
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

background Image is repeating incorrectly

SOLVE

@randymalmquist - Add the following css to the div that has the image as the background:

background-size: cover !important;
background-position: center center !important;

tim@belch.io

View solution in original post

Jsum
Solution
Key Advisor

background Image is repeating incorrectly

SOLVE

@tjoyce is most likely right about this.

 

For some reason when a background image is applied inline, like yours most likely is for the sake of it's editability, background style rules applied from a stylesheet won't take effect unless you use important tags on them. It's not a Hubspot thing, its a web dev thing. If your background image is applied inline then use !important on any "background-" attribute applied from your stylesheet.

View solution in original post

2 Replies 2
Jsum
Solution
Key Advisor

background Image is repeating incorrectly

SOLVE

@tjoyce is most likely right about this.

 

For some reason when a background image is applied inline, like yours most likely is for the sake of it's editability, background style rules applied from a stylesheet won't take effect unless you use important tags on them. It's not a Hubspot thing, its a web dev thing. If your background image is applied inline then use !important on any "background-" attribute applied from your stylesheet.

tjoyce
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

background Image is repeating incorrectly

SOLVE

@randymalmquist - Add the following css to the div that has the image as the background:

background-size: cover !important;
background-position: center center !important;

tim@belch.io