Reputation: 23
I have a owl caroussel in my C# code. How can I place the nav buttons inside my img, like center and not under my image.
Upvotes: 1
Views: 1408
Reputation: 901
Initialize the owl carousel in following method
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
margin:10,
responsiveClass:true,
autoHeight:true,
items:1,
autoplay:true,
autoplayTimeout:10000,
autoplayHoverPause:true,
nav : true,
dots: true, //Make this true
navText : ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"]
})
});
Add CSS of the owl carousel control as following.(Change it accordingly)
.owl-controls {
position: relative;
top: -40px;
}
P.S. : If this is not your query or I might have not understood the query properly please comment it back.
EDITS
For previous button
.owl-prev {
position: absolute;
top: 30%;
left: -50px;
}
For next button
.owl-next {
position: absolute;
right: -50px;
top: 30%;
}
Upvotes: 2
Reputation: 23
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
margin:10,
responsiveClass:true,
autoHeight:true,
items:1,
autoplay:true,
autoplayTimeout:10000,
autoplayHoverPause:true,
nav : true,
dots: false,
navText : ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"]
})
});
the navigation buttons appear under my slide with images. I want the buttons to be inside my image
Upvotes: 0