How to set different banner heights for mobile and desktop views?

24 0 3

Hi, Im just starting to design my store, and i want diffrent images on phone and on desktop, as my banner. I want a long image on my phone and a much shorter on desktop. The image should still be the same image tho.



Password: Boxer



Reply 1 (1)

Shopify Partner
5437 1308 1610

Hi @Elias10 

Check this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • In the "Assets" folder, click on "base.css, style.css or theme.css" file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
  • And Save.


@media screen and (max-width: 749px) {
.banner--large:not(.banner--mobile-bottom):not(.banner--adapt) .banner__content {
    min-height: 50rem !important;
@media screen and (min-width: 750px){
.banner--large:not(.banner--adapt) {
    min-height: 62rem !important;


  • And Save. 
  • Result:
  • Made4uoRibe_0-1700340165909.pngMade4uoRibe_1-1700340190855.png



Please don't forget to Like and Mark Solution to the post that helped you. Thanks!


Please don't forget to 



Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at