Re: White space obove and under collections on mobile version

Solved

White space obove and under collections on mobile version

Antonynex
Explorer
76 3 7

Hello dear people, i had not yet have a solution for the extremly large white space above and underneath the collections section on my landings page on only the mobile version ( on desktop it seems to show right. See screenshot.

Does someone have a soluyion or code for this one pls? Verry mutch appriciate it.

Website nexifox .nl

Pasword: ZrQ367Jg;

Accepted Solution (1)
Arif_Shopidevs
Shopify Partner
520 43 93

This is an accepted solution.

@Antonynex 

Can you try with this css

@media screen and (max-width: 749px) {
  .banner {
    position: relative;
    height: 35vh; /* Flexible height for different screen sizes */
    object-fit: cover;
    display: flex;
    justify-content: center; /* Centers button horizontally */
    align-items: center; /* Centers button vertically */
  }

  .banner .button-class { /* Replace .button-class with your actual button class */
    position: absolute;
    bottom: 10%; /* Moves the button up a bit */
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%; /* Prevents overflow issues */
    text-align: center;
  }
}

Syncora: Backup & Restore [Free] - Automated real-time store backup with one-click easy restore.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery, and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers.

View solution in original post

Replies 10 (10)

Antonynex
Explorer
76 3 7

By the way here is the screenshot of the problem

Screenshot_20250305_110700_Chrome.jpg

Arif_Shopidevs
Shopify Partner
520 43 93

Hello, 
The problem occued for the .banner CSS. If you add this CSS in your store front custom CSS the issue will solved

@media screen and (max-width: 749px) {
 .banner {
  height: 250px; /* Adjust the height as needed for desktop */
  object-fit: cover;
}
}

 

Arif_Shopidevs_0-1741198479844.png

 

Let us know your issue is solved or not.
If it is solved. Mark the post as solved and do not forget to like our solution.

Thank you

Syncora: Backup & Restore [Free] - Automated real-time store backup with one-click easy restore.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery, and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers.

Antonynex
Explorer
76 3 7

Ok, where exactly do i have to put in the code ? In the banner.css or the custom.css  ?

Antonynex
Explorer
76 3 7

I have video-banner and image-banner.

20250305_210029.jpg

20250305_205958.jpg

Antonynex
Explorer
76 3 7

I guess you mean this part ?  But, if i make it 250px the video banner height does not show fully. 

20250305_210553.jpg

Antonynex
Explorer
76 3 7

I tried to implement it but then it does not show my banner fully on mobile and desktop and stil i have a lot of white space below the collections section to 

Arif_Shopidevs
Shopify Partner
520 43 93

If you made 219px the video will show fine. You can add this bellow CSS which will remove the space above featured product.

@media screen and (max-width: 749px) {
 .banner {
  height: 250px; /* Adjust the height as needed for desktop */
  object-fit: cover;
}
div#collection-template--24016398909780__featured_collection {
    padding-top: 10px;
}
}

If you want more control in top banner you can follow this article to use app easily to create banner https://shopidevs.com/how-to-add-a-banner-on-shopify/
Let me inform your issue solved or not. 

Syncora: Backup & Restore [Free] - Automated real-time store backup with one-click easy restore.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery, and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers.

Antonynex
Explorer
76 3 7

I don't understand the part of 219px the video wil show fine. Do i jave to remake the video in 219px or do i have to change the 250px in de code to 219px ? Cause my video is 1920 x 1080 and anything below  750 height it wil cut off a part of the video.  And where exactly do you mean by add this belos css ? In what file i have to put it and where ? 

Antonynex
Explorer
76 3 7

Ok i have put the code in the custom css and it shows ok for the most part, exept when i turn my mobile from vertical to horizontal the button appears to far downwords and overlaps the bottom of the videobanner how, can i fix this  pls ? See screen shot.

Screenshot_20250307_003901_Chrome.jpg

Screenshot_20250307_003941_Chrome.jpg

Arif_Shopidevs
Shopify Partner
520 43 93

This is an accepted solution.

@Antonynex 

Can you try with this css

@media screen and (max-width: 749px) {
  .banner {
    position: relative;
    height: 35vh; /* Flexible height for different screen sizes */
    object-fit: cover;
    display: flex;
    justify-content: center; /* Centers button horizontally */
    align-items: center; /* Centers button vertically */
  }

  .banner .button-class { /* Replace .button-class with your actual button class */
    position: absolute;
    bottom: 10%; /* Moves the button up a bit */
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%; /* Prevents overflow issues */
    text-align: center;
  }
}

Syncora: Backup & Restore [Free] - Automated real-time store backup with one-click easy restore.
Slider Revolution - Create sliders, theme sections, banners, videos, pages, advanced animation, and social feeds.
Essential Grid Gallery - Create photo galleries, video galleries, portfolio galleries, product gallery, collection gallery, and more.
EasyDisplay: Product Showcase - Easily display collections, related products, discounts, recently viewed items, and best sellers.