I am using Dawn 2.0 and changed my slideshow.liquid file so that the entire image is a link. However, when I did that, the header submenu links no longer work (you can click on the submenu items, but it's like they are invisible because it will go to the link from the slideshow image, which is underneath the submenu).
I have tried changing the z-index, but I can't get it to work correctly. My site is www.palmettowoodshop.com and here's the relevant code from my slideshow.liquid section:
<div class="slideshow__media banner__media media{% if block.settings.image == blank %} placeholder{% endif %}">
{%- if block.settings.image -%}
<a class="full-link" href="{{ block.settings.link }}"></a>
<img
srcset="{%- if block.settings.image.width >= 375 -%}{{ block.settings.image | img_url: '375x' }} 375w,{%- endif -%}
{%- if block.settings.image.width >= 550 -%}{{ block.settings.image | img_url: '550x' }} 550w,{%- endif -%}
{%- if block.settings.image.width >= 750 -%}{{ block.settings.image | img_url: '750x' }} 750w,{%- endif -%}
{%- if block.settings.image.width >= 1100 -%}{{ block.settings.image | img_url: '1100x' }} 1100w,{%- endif -%}
{%- if block.settings.image.width >= 1500 -%}{{ block.settings.image | img_url: '1500x' }} 1500w,{%- endif -%}
{%- if block.settings.image.width >= 1780 -%}{{ block.settings.image | img_url: '1780x' }} 1780w,{%- endif -%}
{%- if block.settings.image.width >= 2000 -%}{{ block.settings.image | img_url: '2000x' }} 2000w,{%- endif -%}
{%- if block.settings.image.width >= 3000 -%}{{ block.settings.image | img_url: '3000x' }} 3000w,{%- endif -%}
{%- if block.settings.image.width >= 3840 -%}{{ block.settings.image | img_url: '3840x' }} 3840w,{%- endif -%}
{{ block.settings.image | img_url: 'master' }} {{ block.settings.image.width }}w"
sizes="100vw"
src="{{ block.settings.image | img_url: '1500x' }}"
loading="lazy"
alt="{{ block.settings.image.alt | escape }}"
width="{{ block.settings.image.width }}"
height="{{ block.settings.image.width | divided_by: block.settings.image.aspect_ratio | round }}"
>
{%- else -%}
{{ 'lifestyle-2' | placeholder_svg_tag: 'placeholder-svg' }}
{%- endif -%}
</div>
<style>
a.full-link {
z-index: 3;
}
</style>
These links don't work correctly.
Solved! Go to the solution
This is an accepted solution.
Hi add this code to your base.css
#shopify-section-header {
z-index: 9;
}
This is an accepted solution.
Figured it out. Your code works, it just needs to go in header.liquid, not base.css. Thanks!
This is an accepted solution.
Hi add this code to your base.css
#shopify-section-header {
z-index: 9;
}
I put that code in the base.css exactly as you wrote it, but it didn't change anything.
This is an accepted solution.
Figured it out. Your code works, it just needs to go in header.liquid, not base.css. Thanks!
User | RANK |
---|---|
277 | |
87 | |
56 | |
46 | |
43 |