Reputation: 341
How can I move the navigation arrows? Would like them to be on the sliders images. I have tried everything I could find on the web, no results. Using ASP.NET don't think that it matters though. Using the latest SLICK version.
HTML code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Slick.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Slideshow</title>
<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
<link rel="stylesheet" type="text/css" href="slick/slick-theme.css"/>
</head>
<body><div class="slider-for">
<form id="form1" runat="server">
<div class="slider">
<img src="\img\koral.jpg" />
<img src="\img\ships.jpg" />
</div>
</form></div>
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="slick/slick.min.js"></script>
<script type="text/javascript" src="slick/Instellingen.js"></script>
</body>
</html>
My JS settings:
$('.slider-for').slick({
slidesToShow: 1,
slidesToScroll: 1,
fade: true,
swipe: false,
accessibility: false,
arrows: false,
});
$(document).ready(function () {
$('.slider').slick({
slide: 'img',
dots: true,
infinite: true,
speed: 300,
arrows: true,
centerMode: true,
variableWidth: true,
autoplay: true,
autoplaySpeed: 2000,
appendArrows: $('img'),
appendDots: $('img')
});
});
EDIT: Found out the problem was that my cache wasn't refreshing.. There is one arrow under the slideshow now, how can i move it to the front?
Upvotes: 1
Views: 6841
Reputation: 357
Try using CSS to move navigation buttons inside slider. For example:
.slick-prev {
left: 25px;
z-index: 1;
}
.slick-next {
right: 25px;
}
.slick-prev:before, .slick-next:before {
color: #000;
}
Upvotes: 2