kombai / freewall

Freewall is a cross-browser and responsive jQuery plugin to help you create grid, image and masonry layouts for desktop, mobile, and tablet...
MIT License
1.85k stars 375 forks source link

Could you give me some help in my project? #155

Open nishikazuhiro opened 9 years ago

nishikazuhiro commented 9 years ago

Hi there, how are you?

First of all, awesome plugin man! I've been playing with it for some time and I've decided to implement it in some projects. But I encountered some issues which I can't fix myself and I would be grateful if you could give me a hand.

I have changed the sizes of the blocks from your style.css default file. Basically, for my needs, I changed the minimum size from 80px X 80px to multiples of 90px X 90px. So...

.size2-2 { width: 90px; height: 90px; }

.size11 { height: 180px; width: 180px; }

.size12 { width: 180px; height: 360px; }

.size21 { width: 360px; height: 180px; }

So on...

But then, by changing these values itself in style.css and setting the cellW to 360 and cellH to 180, my first block won't stay on first position after I resize the browser to mobile view. The block goes all way down to the bottom. But if I use the "original" sizes from the style.css and if I keep the cellW to 320 and cellH to 160, the first block keeps as the first one. I've tried to set data-position on the first block, but it doesn't work either.

If you could send me a message to me on twitter, I would be glad. My account is @nishikazuhiro.

Thanks in advance and keep up the good work.

kombai commented 9 years ago

Hi, You can change with in the style.css to 360px, but you don't need change the cellW to 360, you can keep it at 320 for test. Best

nishikazuhiro commented 9 years ago

Hey there. Thanks for replying.

I did what you said, but it still doesn't work. Also, my content gets smaller if I do that and I get more columns/divisions the larger the window gets. I know there is a a method called fixPos, but then, how does it work?

I'm going to provide you a link of the project so you can understand what's happening. http://kazuhiro.nishi.co/allen/sebrae/ec-dashboard-home.html

Try resizing the browser's window to see how the first block (the carousel news block) behaves. When you reach the mobile breakpoint, it goes all way down, but just because I have changed the values of the style.css. It does work with the default size, but I don't have a clue on how to make it stay fixed when I change the sizes.

Thanks again! Looking forward your reply.

kombai commented 9 years ago

Hi, you can set data-position="0-0" for fixed the box at top-left: https://github.com/kombai/freewall/blob/master/example/fix-position.html

You also using keepOrder: true if need. Best

nishikazuhiro commented 9 years ago

Hello again! I've done what you said above and still doesn't work. I don't have a clue. Any other advices you could give me?

Thanks a lot again!