Search code examples
google-plusphoto-gallery

Display the photos as on Google+


I'm currently working on a gallery to my photos. Besides some bugs, I'm finished with the gallery but I want to add a new and fresh theme to the front page. I'm very in love with how Google+ shows the photos and I'm asking you now, how can I add this effect for my list of photos in my own gallery?

Thanks in advance.


Solution

  • It appears they are using divs for rows and sub-divs for columns. You could, dynamically or statically, determine which of these formats you will have for the row:

    //1
    [    ][  ]
    [    ][  ]
    [    ]====
    [    ][  ]
    //2
    [   ][   ]
    [   ][   ]
    

    From there style the rows and columns as { float: left } and make images { width: 100% }. Here is a tutorial on infinite scrolling image galleries: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-an-infinite-scroll-web-gallery/ and you could just fade in images as you display them.