I'm not sure how to fix the breakpoints?

I received this request and I’m not sure what to do? Please advise, thanks!
The banner is moving around and inconsistent when the screen changes sizes. If necessary, the background image can be changed or the ipad image removed.

Hello @gramirez,

i think the issue here is that the height of the banner changes a lot during resizing of the screen.

You could try to give the banner a fixed hight like 75vh (vh = view height).

This will always takes the hight of the browser window (in this case 75%) and you’ll get rid of the moving/jumping issue.

You also could calculate the header out, to not get a scroll of the herobanner. Since the header is also on the screen.
Your header is about ~150px

height: calc(75vh - 150px);

You might get some displaying errors on your breakpoint 768px between1200px with the iPad image

I hope this helps you somehow.

- Chris

Thanks Chris, I’ll try this! I really appreciate you taking the time to assist me. Have a great day!

Hi @gramirez,

you should also add following things to your div where the background-image is located:


background-size:cover;
background-position: center center; {# if you want to position it centered; percentage values are also possible #}
height: calc(75vh - 150px); {as chris mentioned}
overflow:hidden; {# this helps often to eliminate horizontal scrolling #}

Further more: search for following section(s) in your CSS-files(s2_styles.css and s2_styles-N-D.css):

@media (max-width: 1199px){
.row-fluid .product-herosectiontwo .product-heroimg {
 position: unset;
 margin: 0px;
 width: 100%;
 max-width: 100%;
}
}
@media (max-width: 1199px){
.row-fluid .product-herosectiontwo .product-heroimg {
 position: absolute;
 margin: 0px;
 max-width: 55%;
 top: 60px;
 right: -250px;
}
}

@media (max-width: 992px) and (min-width: 768px){
.row-fluid .product-herosectiontwo .product-heroimg {
 top: 140px !important;
 right: -211px !important;
}
}

and delete them and write following instead in only one file:

@media (max-width: 1199px){
.row-fluid .product-herosectiontwo .product-heroimg {
 position:absolute; 
 left: 50%;
 top: 70%;
 width: 66%;
}

right before your mobile-queries or at the very bottom(but this might overwrite your mobile-queries).

Tipp: Most of the display failures are coming from multiple CSS files with a lot of “!importants” which are fighting against each others. Since this looks like a “new” theme I would suggest to work with a seperate CSS file which is applied after the “global-overrides.css” if you want safe some time and nerves(I know how frustrating debugging can be) :slightly_smiling_face:

Also consider change the tables to divs. Those are not very responsive and break the page on mobiles.

best, Anton

Wow! Thank you so much for your reply Anton! I’ll definately try this. I should be getting to this today, I’ll keep you posted on how it goes. Thanks again! Have a great day!