title: css float left gap issue
body: <p>i am using css float left to automatically align but if last element is slightly bigger it goes to next line and makes big gap which looks odd. in mobile devices i want to display only one element per line and it does but again keeps lot of spaces. can i use device width as width ???? for mobile 
  is there any better way to do so that it looks like pinterest
  direct link 
     here is the fiddle </p>
  
  <p><a href="https://jsfiddle.net/hk80gj1m/1/" rel="nofollow noreferrer">https://jsfiddle.net/hk80gj1m/1/</a></p>
  
  <p><a href="http://way2enjoy.com/celebrity-wallpapers" rel="nofollow noreferrer">http://way2enjoy.com/celebrity-wallpapers</a></p>
  
  <pre><code> &lt;div class="content_main_div div_100_per"&gt;&lt;div id="timeline_content"&gt;&lt;div&gt;&lt;div class="content_box_main"&gt;
  &lt;div id="5"  align="left" class="messagelove_box" style="width: 225px; float:left; height:310px;" &gt;&lt;div class="content_box_1"&gt;
           &lt;div class="content_box_2z"&gt;&lt;sup class="joke_icon"&gt;&lt;/sup&gt;&lt;/div&gt;
           &lt;div class="content_box_3_title"&gt;deepika padukone best hd        &lt;br&gt;16 Wallpapers&lt;/div&gt;
           &lt;div class="content_box_3_text"&gt;&lt;a href="http://way2enjoy.com/deepika-padukone-best-hd-wallpapers-images-photos-pics" target="_blank"&gt;&lt;img src="http://way2enjoy.com/themes/blue/thumbnail.php?file=http://way2enjoy.com/c/deepika-padukone-best-hd-wallpapers-images-photos-pics/Deepika-Padukone-best-hd-wallpapers.jpg&amp;width=180&amp;height=220" alt="deepika-padukone-best-hd-wallpapers-images-photos-pics" title="deepika-padukone-best-hd-wallpapers-images-photos-pics"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="4"  align="left" class="messagelove_box" style="width: 225px; float:left; height:310px;" &gt;&lt;div class="content_box_1"&gt;
           &lt;div class="content_box_2z"&gt;&lt;sup class="joke_icon"&gt;&lt;/sup&gt;&lt;/div&gt;
           &lt;div class="content_box_3_title"&gt;cute britney spears        &lt;br&gt;18 Wallpapers&lt;/div&gt;
           &lt;div class="content_box_3_text"&gt;&lt;a href="http://way2enjoy.com/cute-britney-spears-wallpapers-images-photos-pics" target="_blank"&gt;&lt;img src="http://way2enjoy.com/themes/blue/thumbnail.php?file=http://way2enjoy.com/c/cute-britney-spears-wallpapers-images-photos-pics/britney-spears.jpeg&amp;width=180&amp;height=220" alt="cute-britney-spears-wallpapers-images-photos-pics" title="cute-britney-spears-wallpapers-images-photos-pics"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="3"  align="left" class="messagelove_box" style="width: 225px; float:left; height:310px;" &gt;&lt;div class="content_box_1"&gt;
           &lt;div class="content_box_2z"&gt;&lt;sup class="joke_icon"&gt;&lt;/sup&gt;&lt;/div&gt;
           &lt;div class="content_box_3_title"&gt;amitabh bachchan        &lt;br&gt;22 Wallpapers&lt;/div&gt;
           &lt;div class="content_box_3_text"&gt;&lt;a href="http://way2enjoy.com/amitabh-bachchan-wallpapers-images-photos-pics" target="_blank"&gt;&lt;img src="http://way2enjoy.com/themes/blue/thumbnail.php?file=http://way2enjoy.com/c/amitabh-bachchan-wallpapers-images-photos-pics/deewar.jpg&amp;width=180&amp;height=220" alt="amitabh-bachchan-wallpapers-images-photos-pics" title="amitabh-bachchan-wallpapers-images-photos-pics"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="2"  align="left" class="messagelove_box" style="width: 225px; float:left; height:310px;" &gt;&lt;div class="content_box_1"&gt;
           &lt;div class="content_box_2z"&gt;&lt;sup class="joke_icon"&gt;&lt;/sup&gt;&lt;/div&gt;
           &lt;div class="content_box_3_title"&gt;aamir khan        &lt;br&gt;21 Wallpapers&lt;/div&gt;
           &lt;div class="content_box_3_text"&gt;&lt;a href="http://way2enjoy.com/aamir-khan-wallpapers-images-photos-pics" target="_blank"&gt;&lt;img src="http://way2enjoy.com/themes/blue/thumbnail.php?file=http://way2enjoy.com/c/aamir-khan-wallpapers-images-photos-pics/30548-aamir-1448536297-421-640x480.jpg&amp;width=180&amp;height=220" alt="aamir-khan-wallpapers-images-photos-pics" title="aamir-khan-wallpapers-images-photos-pics"/&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="lastlove_loader"&gt;&lt;/div&gt;
  </code></pre>