简体   繁体   中英

Div size miscalculating using Orbit Jquery Plugin

i am using the jquery plugin Orbit and it works fine in FF. in chrome and safari it miscalculates the div size as 1px high and wide and applies it to the wrapper div.. so no photos show up.

is there something specific about the rendering engines that make it calculate correctly in one browser but not in another? I have set the style of the wrapper div in my stylesheet, but Orbit applies the style inline which overrides.

any suggestions would be appreciated. i have it running correctly here http://jsfiddle.net/j9zLe/ in all browsers, but the page i am using it on has a lot of other code on it. i think it must be some style further up the chain... but not sure what to look for.

thanks Liz

In the jquery.orbit-1.2.3.js file on line 52 is the following line:

orbit.add(orbitWidth).width('1px').height('1px');

I'm not sure of the point of this line however if you change the width and height values to the values for your slides or comment-out the line I'm fairly sure it will fix your problem.

In your jsfiddle you need to add a resource for the JavaScript and CSS files for Orbit to make it render properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM