Re: how to make the banner's height smaller on desktop only

Solved

how to make the banner's height smaller on desktop only

INKLY
Pathfinder
140 0 18

Hi, Does anyone know how to make the banner's height smaller on desktop only 

INKLY_0-1728061017242.png

Similar to how it looks on mobile: 

INKLY_1-1728061052613.png

Thank you ! Best regards,
Store URL: https://servicedetable.com/pages/contact

 

 

Accepted Solution (1)

BSSCommerce-B2B
Shopify Partner
1954 562 561

This is an accepted solution.

hi @INKLY , 

To make the banner's height smaller only on desktop while keeping the height unchanged on mobile, you can target the desktop viewport using a media query. Here's how you can adjust the height of the banner specifically for desktop devices:

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1728065315795.png

Step 2: Search for the file theme.liquid. And add this code snippet before tag </head> or </body>: 

<style>
@media (min-width: 768px) {
  .slide--image_slide_adaptive_PKRNwF {
    height: 400px !important;
  }

  .slider__image--adaptive.hide-mobile {
    height: 100% !important;
    object-fit: cover !important;
  }
}
</style>

Step 3: Save and reload home page.

=>> The result: 

BSSCommerceB2B_2-1728065391537.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

View solution in original post

Replies 6 (6)

comercioservice
Shopify Partner
264 37 30

@INKLY  hi Hope you are well,

I’ve taken a look at what you need—just a little CSS magic, and everything will be fixed! Follow my steps, and you'll have it sorted in no time!
1, from admin, go to Online Store > Themes.
2, Actions > Edit code for your active theme.
3, Find and open the theme.liquid file, maybe in the Layout folder.
4, Look for the </head> tag and paste the code in the end

 

 

 

@media only screen and (min-width: 768px) {
 
.slide.adaptive {
    height: 250px;
}

  .slider__image--adaptive.hide-mobile {
    height: 100% !important;
    object-fit: cover !important;
  }
}​

 

 

result:gutenplayer_0-1728065198159.png

 

I hope it works for you, let me know, and If you'd like to discuss this more, don't hesitate to send me a PM
Thank you
Was my reply helpful? Click Like to let me know! Was your question answered? Mark it as an Accepted Solution.
Need store customizations, bug fixing or development ? Contact with us -- Support form for quick quote!
BFCM Big Deals: Big savings 25% off -on our Shopify FAQs apps!

BSSCommerce-B2B
Shopify Partner
1954 562 561

This is an accepted solution.

hi @INKLY , 

To make the banner's height smaller only on desktop while keeping the height unchanged on mobile, you can target the desktop viewport using a media query. Here's how you can adjust the height of the banner specifically for desktop devices:

Step 1: Go to Admin -> Online store -> Theme > Edit code:

BSSCommerceB2B_0-1728065315795.png

Step 2: Search for the file theme.liquid. And add this code snippet before tag </head> or </body>: 

<style>
@media (min-width: 768px) {
  .slide--image_slide_adaptive_PKRNwF {
    height: 400px !important;
  }

  .slider__image--adaptive.hide-mobile {
    height: 100% !important;
    object-fit: cover !important;
  }
}
</style>

Step 3: Save and reload home page.

=>> The result: 

BSSCommerceB2B_2-1728065391537.png

 

I hope these instructions will help you. If they are helpful, please give us likes and mark as the solution.

Have a nice day sir! 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

INKLY
Pathfinder
140 0 18

Thank you this looks great!

BSSCommerce-B2B
Shopify Partner
1954 562 561

Hi my friend @INKLY , 

We're happy to see that our suggestion helped you solve the issue.

Glad to helps! 😍

 

B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.


B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.


B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.


BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now

Sayed_Safin
Shopify Partner
44 2 2

Hi @INKLY ,
How many reduced size do you want? Do you have any specific pixel for that? 
Thanks.

Problem Solved? ✔Accept and Like solutions to help future merchants.
Github: https://github.com/safin777
Buy me a coffee

Made4uo-Ribe
Shopify Partner
8780 2101 2575

Hi @INKLY 

Check this one. 

From you Admin page, go to Online Store > Themes

Select the theme you want to edit

Under the Asset folder, open the main.css(base.css, style.css or theme.css)

Then place the code below at the very bottom of the file.

 

@media only screen and (min-width: 749px){
#s--template--22238555799880__section_slider_adaptive_tQnVQ7 .slider__image--adaptive {
    height: 300px;
}
}

 

And Save. 

Result:

Made4uoRibe_0-1728069025642.png

 

 

 

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

If this fixed your issue Likes and Accept as Solution is highly appreciated. Coffee tips fuels my dedication.
Get EXPERIENCED Shopify developers at affordable rates—visit Made4Uo.com for quick quote!
Do not lost your Shopify store! Get FREE trial with ✔️ Rewind Backup: Automatic, reliable, stress-free.
Need THEME UPDATES but has custom codes? No worries, contact us for affordable price.