akoenig / angular-deckgrid

A lightweight masonry-like grid for AngularJS.
http://akoenig.github.io/angular-deckgrid
MIT License
1.1k stars 190 forks source link

Dynamic columns #93

Closed mhipo1364 closed 9 years ago

mhipo1364 commented 9 years ago

Hi guys

I need help, I want to use this package responsive, but this package has just 5 columns, so when I zoom out my browser, it fixes to show data on just 5 columns, but some website like pinterest has dynamic columns to show data.

How can I reach to this feature? Is there a setting to config it?

mhipo1364 commented 9 years ago

@akoenig : Dear Andre would you kindly help about this issue ?

I defined @media for each screen to make my tiles responsive, but when I zoom-out or zoom-in the screen, they goes crazy, something like this:

Image

http://s23.postimg.org/5z0eb0l3t/Screenshot_from_2015_09_04_01_40_17.png

Would you please lead me to make ties like pinterest ?

akoenig commented 9 years ago

@mhipo1364 Thanks for your response.

You can define as much columns as you want by creating the respective CSS selector structure. Let's say you want to define a max of 10 columns:

.deckgrid[deckgrid]::before {
    content: '10 .column.column-1-10';
    font-size: 0;
    visibility: hidden;
}

.deckgrid .column {
    float: left;
}

.deckgrid .column-1-10 {
    width: 10%;
}

You can find further information about this in the section The Grid configuration.