Need Help Inserting Collection Banner

Highlighted
Tourist
27 0 0

Hi everyone,

 

Trying to add a banner to a collection template but the banner keeps on showing up oversized and I cannot seem to get it fitting the page.

 

I've tried:

<div class="sale-banner"><img src="Banner Url"/></div>

<div style="width: 100%"><img src="Banner Url"/></div>

 

Can anyone with a good eye for coding identify the problem here?

 

Thanksbanner code.pngbanner output.png

0 Likes
Shopify Partner
111 9 22

Hey @csimacc ! Try putting the image in a container, like this: 

 

<div class="container"> 
<img src="url goes here">
</div>

It looks like you already have a collection header image feature in there already. Are you not using the collection header feature in your theme customizations? In any case, if that doesn't work, you could also put the code in the header itself, or customize the header class block to display the image how you'd like. For example, getting rid of an overlay. In any case, let me know if this helps! 

 

 

 

I am a multi-disciplined web developer with years of experience working with several languages and frameworks.
0 Likes