Swiper nav arrows outside the swiper-container
See original GitHub issueHi guys, I’m trying to display the nav arrows outside the swiper-container and not over the slider. I tried positioning with CSS:
.swiper-button-next, .swiper-container-rtl .swiper-button-prev{ right:-20px; } .swiper-button-prev, .swiper-container-rtl .swiper-button-next{ background-image:url(assets/img/swiper-left.png); left:-20px; }
But the arrows won’t display because of the swiper-container CSS overflow: hidden;
So I tried moving the nav arrows outside the swiper-container, now they display but they effect all the Swipers in the page.
My Swiper is configured like this:
initialize swiper */ var mySwiper = new Swiper ('.swiper-container', { // Optional parameters nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', slidesPerView: 2, spaceBetween: 30, loop: true });
Any ideas?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Related StackOverflow Question
Have you tried to simply put the swiper-button-next,prev outside the swiper-container then adjust with css?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.