Giter VIP home page Giter VIP logo

Comments (4)

desandro avatar desandro commented on August 16, 2024

Do you have a live link I could take a look at? You could try to reproduce it in http://jsfiddle.net

from masonry.

totor2027 avatar totor2027 commented on August 16, 2024

Thanks for response,

here jsfiddle link : http://jsfiddle.net/ANx8C/

from masonry.

totor2027 avatar totor2027 commented on August 16, 2024

I find an solution working in Firefox.
Put
masonryOptions={
columnWidth: 1, }

look the jsfiddle link

Thank a lot

from masonry.

desandro avatar desandro commented on August 16, 2024

For your example, I believe you want to set columnWidth: 330 This because col4 have 300px width + 10px left padding + 10px right padding + 5px left margin + 5px right margin.

Then set .col5 { width: 630px } so .col5 brick fits right in.

see http://jsfiddle.net/ANx8C/5/embedded/result/ --- code: http://jsfiddle.net/ANx8C/5/

I strongly recommend against using columnWidth: 1 as a solution. When you set the columnWidth to 100, that means, for every 100 pixels, the script tries to find the best position for the 'brick.' If the brick is 100px wide, and the container is 800px wide, that loop will be 8 iterations. If the columnWidth is 1, the loop is 800. You are incurring way too many iterations within the loop.

from masonry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.