ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.03k stars 1.2k forks source link

Dynamic column number based on parent element size? #374

Closed ScottBeeson closed 10 years ago

ScottBeeson commented 10 years ago

How can I configure gridster so that it basically fills the screen? For instance, when my browser is full screen it would have 8 columns but if I made my browser window smaller gridster would automatically reduce to 6 columns, etc. It seems like there must be something simple I'm missing.

I have a div that is absolutely positioned with top, left, right and bottom set to 0px. I'm then using add_widget() to add a few widgets with a for loop. If I set max_cols to null, my div is the size I expect (full screen), but there are no widgets. If I set max_cols to anything else, I get that many columns and my div is no longer full screen.

Hopefully this makes sense...

image

vieron commented 10 years ago

Duplicate of #5. Responsive grid is not supported by gridster.