diff --git a/demos/responsive.html b/demos/responsive.html
index b35eed2f43..4989f5d2af 100644
--- a/demos/responsive.html
+++ b/demos/responsive.html
@@ -21,7 +21,7 @@
enabled: true
}
}).data('gridster');
- $('.gridster ul').css({'width': $(window).width()});
+ $('.gridster ul').css({'padding': '0'});
});
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js
index cc3f3df48d..c9fe703e3a 100755
--- a/src/jquery.gridster.js
+++ b/src/jquery.gridster.js
@@ -3689,7 +3689,7 @@
*/
fn.get_responsive_col_width = function () {
var cols = this.cols || this.options.max_cols;
- return (this.$el[0].scrollWidth - ((cols + 1) * this.options.widget_margins[0])) / cols;
+ return (this.$el[0].clientWidth - 3 - ((cols + 1) * this.options.widget_margins[0])) / cols;
};
/**