开发者

jQuery bxSlider does not start at the right position

I cannot find out what I am doing wrong. So far, I have tested this only in Internet Explorer, so it could be that Firefox and Chrome aren't parsing the code properly.开发者_如何学Python

http://ontwikkelomgeving.wijzijnblits.nl/ginkelbemmelen/luuk/

My problem is that the bxSlider on the page will start approximately 20px to the right. I do not define this (as far as I know) so I don't know why this is happening. If you click the 1 button, then it slides to the right place.


Add this style in slider1 padding:0px !important;

<ul id="slider1" style="list-style: none outside none;padding:0px !important;">


Luuk or anyone else,

Add

style='margin:0 0 0 0;' 

to the tag at the start of your list of scrolling objects, completely sorted it for me


Try this: Wherever there are functions with .outerHeight() or .outerWidth() calls, change this to -> .outerWidth(true) .outerHeight(true)

It does mean bxSlider count margins as well. It helps me to fix bad-position issues.


i had the same problem. for #slider1, use liststyle: none; worked for me.


What fixed any problems like this for me was to activate the plugin after the page has loaded.

If you are using jquery, that do it like this

$(window).load(function() {
      //add your code here
)};

Mootools, it would be like this

$('document').addEvent('domready', function() { 
    //code here...
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜