Give a link to whole slider image

2 replies·opened Dec 27, 2021
M
mervezoeDec 27, 2021

Hi there,

I searched other tickets but couldn't solve it, sorry if I'm asking again.
I want to give link to the slider images without deactivating the slider. I'm using the medical demo, you can find my code below.

<div class="swiper-container swiper-parent">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="swiper-slide-bg" style="background-image: url('demos/medical/images/slider/1-1.jpg');">

</div>
</div>...

Thanks,
Merve.

S
SemiColonWebSTAFFDec 29, 2021

Hello,

Thanks for your Patience!

Consider using the following code:

<div class="swiper-slide dark">
	<div class="container">
		<div class="slider-caption slider-caption-center">
			...
		</div>
	</div>
	<div class="swiper-slide-bg" style="background-image: url('images/slider/swiper/1.jpg');"></div>
	<a href="https://your-website.com/" class="position-absolute top-0 start-0 w-100 h-100" style="z-index: 21;"><span class="visually-hidden">Link to Website</span></a>
</div>

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

M
mervezoeDec 29, 2021

Yes it worked perfectly! Thanks a lot.

Cheers.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard