How can I apply an extended image header to all pages?

I was able to use this code to extend the first image on the page to my header:

{% if template contains ‘index’ %} div#shopify-section-header { position: absolute; width: 100%; left: 0px; } div#shopify-section-header .header-wrapper { background: rgb(0 0 0 / 41%) !important; } {% endif %}

This worked but it did not work for all of my pages. How do I make sure this is applied to all of them? Thanks!

@estironni - you will need to remove those if conditions at start and end, so code becomes

div#shopify-section-header { position: absolute; width: 100%; left: 0px; } div#shopify-section-header .header-wrapper { background: rgb(0 0 0 / 41%) !important; }

Remove the if condition

div#shopify-section-header { position: absolute; width: 100%; left: 0px; } div#shopify-section-header .header-wrapper { background: rgb(0 0 0 / 41%) !important; }

So I replaced the code with the code you sent but it doesnt seem to be working

@estironni - can you please share your website link?