new google images how do they float correctly

Tags: html,css,image,scripting

Problem :

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?

Solution :

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.

    CSS Howto..

    How to convert bullet points into horizontal list?

    How to center an image .logo via css? [duplicate]

    How to set margin left and right to the center div when using float:left

    How to position HTML code over CSS

    How can I change the css properties of a google visualization table and it columns?

    How to keep div visible when hovering another div

    How can I increase the size of twitter bootstrap carousel navigation arrows

    How to structure CSS classes? By entities or by aspects?

    How to add image at right bottom div using css

    How can I create the shape of side mirrors of a truck/lorry?

    How can I make this work?

    How to adjust contents to automatically fit size of the screen?

    How to apply CSS style for getting shadow for text area

    How to link Body/Html Backgrounds with CSS in Ipad/Iphone (safari)

    How do I get two adjacent spans to display their text vertically?

    Creating “columns” inside a DIV: how to place them?

    how to use !important in jQuery animate() function

    How can I create this centered header with multiple colors?

    How to keep an element fixed top within another element?

    How can I use CSS to show and hide multiple elements at once?

    How to make android app for existing dynamic website

    How to align stacked Font-Awesome icons correctly

    Using Susy, how can I make a div expand to height of tallest sibling?

    How to center absolute position element in my case

    Hovering over item in WordPress list of pages shows Featured Image

    Show specific comment in LESS file when compiled to CSS while keeping all other comments hidden

    how to create a vertical menu in html/css [closed]

    How do I get a bold version of a custom font?

    How to do Vertical+Horizontal centering in CSS

    How can I indent all text in a paragraph except the first line?