Just wondering if it's possible to change the number of columns in a Views grid style dynamically?

I'd like the no. of columns to change depending on the width of the user's screen. I'm thinking arguments...
Is it possible?

Comments

merlinofchaos’s picture

Status: Active » Closed (won't fix)

Possible? Yes. Easy? No.

To do this, you would have to create some custom code to modify the option that controls the number of columns. I'm not exactly sure where to do this; it would take some amount of research to figure out the right place to do it, and I'm afraid you're on your own for that.

Anonymous’s picture

That's ok, I ended up just floating all the teasers left (so they appear one after the other) and added some special CSS to make it look good in both FF and IE.

aneuryzma’s picture

hi, I've to do exactly the same. And I also end up with your solution *float:left*.

However I need the elements being vertically distributed (along columns and not rows).

Can you give me any tip ?

thanks

Anonymous’s picture

Not sure how to do vertical columns (may have to try a Google search for that), but for anyone else interested in this, the Views Fluid Grid module is perfect: http://drupal.org/project/views_fluid_grid