Hi,
This forum has been really great to refer to while building my first opencart (v.2102) site.
I am now stuck on the carousel and searching isn't helping. Any guidance appreciated on:
1 - How to horizontally centre the images for the front page carousel, i've tried lots of things but nothing has worked, they are always left aligned
2 - How to make main slideshow a loop instead of left scrolling back to first slide (quickly passing all middle slides).
site is brownsfoodco.com
Thanks in advance.
You can take help from the following code and make changes accordingly.
(
function()
{
var width=$('.owl-item').css('width');
var widths=width.split('px');
var no_of_items=<?php echo $item;?>;
var width=Number(widths[0])/Number(no_of_items);
var dimension=<?php echo $width;?>;
if(Number(dimension)<Number(width))
{
var left_width=Number(width)-Number(dimension);
left_width=Number(left_width)/2;
left_width=parseInt(left_width);
//alert(left_width);
$('.owl-item').css({'padding-left':left_width+'px','padding-right':left_width+'px'});
}
}
);
(
function()
{
var width=$('.owl-item').css('width');
var widths=width.split('px');
var no_of_items=<?php echo $item;?>;
var width=Number(widths[0])/Number(no_of_items);
var dimension=<?php echo $width;?>;
if(Number(dimension)<Number(width))
{
var left_width=Number(width)-Number(dimension);
left_width=Number(left_width)/2;
left_width=parseInt(left_width);
//alert(left_width);
$('.owl-item').css({'padding-left':left_width+'px','padding-right':left_width+'px'});
}
}
);
Opencart Expert | sales[at]ost.agency
Skype - manish.osuniverse | Gtalk - manishmt
Extensions for Opencart @ https://www.ost.agency/product/product- ... extensions
ost.agency - ecommerce website design, development and digital company
Who is online
Users browsing this forum: No registered users and 4 guests