title: How to set auto-margin boxes in flexible-width design using CSS?
body: <p>I have DIV with flexible width set e.g. min-width:800px and max-width:1400px. In this DIV, there are many boxes with fix width 200px and display:inline-block. So depending on parent DIV width, these boxes fill the entire space. </p>
  
  <p>My problem is the blank space on the right side which is caused by variable width of the parent div. Sometimes this blank space is small and looks fine, but with different widths of the parent div, this blank space is almost 200px.</p>
  
  <p>I don't know, if I described my problem in enough detail, I hope this picture will help to describe my actual situation:</p>
  
  <p><img src="https://i.stack.imgur.com/SVOnN.png" alt="enter image description here"></p>
  
  <p>And this is what I would like to have:</p>
  
  <p><img src="https://i.stack.imgur.com/izDzl.png" alt="enter image description here"></p>
  
  <p>This auto-margin could be easily achieved by using TABLE. However, I don't know the exact number of columns, since it depends on user's screen resolution. So I can't use table and rather stick with CSS.</p>
  
  <p>Anyone has an idea how to solve this ? Thank you in advance for your comments and answers. </p>
  
  <p><strong>EDIT:</strong> I don't need support of IE6. I would like to support IE7, but IE7 is optional as I know there are limitations so I will probably use fixed width of "div.wrapper" in IE7</p>
  
  <p><strong>EDIT2</strong> I need to handle multiple rows of these boxes, so they don't exceed the "div.wrapper" box and wrap correctly in multiple lines of boxes, not just in one long line.</p>
  
  <p><strong>EDIT3</strong> I don't know the number of "columns" as this is very variable depending on user's screen resolution. So on big screen there could be 7 boxes in one row, and on small screens there could be just 4 boxes in one row. So I need solution that doesn't set fixed number of boxes in one row. Instead, when the boxes don't fit in one row, they should just wrap to a next row.</p>