Re: How to make image banner size smaller?

How can I reduce my image banner size on pages?

arutze
Explorer
47 0 18

For some reason, the smallest image size on Image banner in any Pages are very big, I wanted all the banners to have standard banner size.

 

This is how the smallest banner size looks like:

 

Screenshot 2023-07-13 at 11.31.01.png

Replies 2 (2)

Transcy
Shopify Partner
285 19 87

Hello @arutze ,

 

You can try to follow these steps:

Go to Online Store -> Themes -> Actions -> Edit code

Go to Sections -> page-template.liquid

Add a CSS class or ID to the image element within the code. For example:

{% if page.image_banner %}
  <div class="image-banner">
    <img src="{{ page.image_banner | img_url: 'master' }}" alt="{{ page.title }}">
  </div>
{% endif %}

Go to Assets folder -> base.css file -> add this following code at the bottom of page

.image-banner img {
  max-width: 100%;
  height: auto;
}

Save and preview 

 

Hope this can help.

Transcy

Transcy - The #1 Translation and Currency Converter
- Was my answer helpful? Please hit Like or Mark it as solution!
- Get in touch with us: App Store | Blog
arutze
Explorer
47 0 18

Hi @Transcy , I don't have the page-template.liquid section 😞
and can you confirm that it will not affect the image banner size on the main page?