Help me fix html div width in javascript

Ok, I encoded some html pages. I have included jQuery slider. Slider slider. My site uses a fluid layout. If you minimize the page vertically, you can see that the images in the right corner are moving to the left.

But I have some kind of problem. I also want to move the navigation on the right-hand slider when the user squeezes the page vertically.

The problem is that I could not apply 100% width in the slider. The slider automatically creates a width based on the size of the image. I do not know how to change it to 100% width.
You can check the slider on this page.

Click here to go to the page.

This is my javascript file.

Javascript file

This is where javascript uses width.

var b = 0, p = 0, h, v, u, f = d(this).addClass("orbit"), c = f.wrap('<div class="orbit-wrapper" />').parent(); f.add(h).width("1px").height("1px"); var e = f.children("img, a, div"); e.each(function () { var a = d(this), b = a.width(), a = a.height(); b > f.width() && (f.add(c).width(b), h = f.width()); a > f.height() && (f.add(c).height(a), v = f.height()); p++ }); 

You can check this in the javascript file. I want a width of 100%. Please give me some idea. Thanks

+6
source share
1 answer

Can you make the slider be 100 and% with important css? I tried this through firebug and it seemed to work.

example change your css to:

 .orbit-wrapper: { width: 100% !important; } 
+3
source

Source: https://habr.com/ru/post/892430/


All Articles