Question

I'm using gridster to create dynamic grids with 5 pixel margin space between widgets.
but it creates 10 pixel margins! (see this)
actually it adds margin for both neighbor widgets (left & right widgets)
How can i make gridster to collapse margins so the gap between two neighbor widgets be 5 pixel?

Thanks

Était-ce utile?

La solution

http://jsfiddle.net/fresheyeball/d6BWD/

  gridster = $(".gridster > ul").gridster({
      widget_margins: [2.5, 2.5],
      widget_base_dimensions: [100, 100]
  }).data('gridster');

5 + 5 = 10

2.5 + 2.5 = 5

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top