Search code examples
htmlcsscss-floatfillautofill

Fill empty space


Hi guys this is my problem (please visit the image link): http://dominioestudio.com/example.png

Im making a website and i cant figure it out how to fill the red space with the element below (the one into the cian rectangle).

This is the code from those elements (the gray contents)

.post {
  background: #CCC;
  width: 48%;
  margin: 10px 1%;
  float: left;
}

I can't use absolute position because the information of this website will change every day (so i need every element to be able to adapt / fill the space regardless the height of the others).

ideas?

Edit: some fo you ask me to make a jsfiddle. here it is: http://jsfiddle.net/sirmarcio/bLo5v79v/


Solution

  • You could use columns: auto 2; in your .grid-wrap and display:inline-block; on your .post elements: Fiddle