views:

74

answers:

3

Has anyone seen the new google image search. It manages to make the images float in an area. the images fit into this correctly by grouping them in the sizes.

Frog images

I guess there are two ways of doing this:

  • Scripting by some sort of rule involving the widths and heights of these images
  • A Css rule for creating the images.

In a scripting scenario we could use a max width of 1000px then group up images to fill this 4 times for our 4 lines of images.

The Css rule would have to make the images float but also re order them.

Does anyone have any other ideas on how this would work?

+1  A: 

I think google doing all these staf on server: try to resize window - it will be reloaded in a sercond with resized images. On the other hand I found a canvas element that also could be used to resize loaded images with js

fantactuka
They also keep their order, this would indicate that the images are scaled so they will fit into a grid 10, 8, 6, 4, 3 across. Complicated!
Paul
+1  A: 

They re-size images with canvas js. Then set li width, height and then add overflow hidden. You also can get same result if you set width on all your images in css img.myimg {width:70px}. I don't think it will take longer to render the page then using js code.

Gil Duzanski
A: 

I have the same question.