Well you can lose the id attribute on the div unless each div has a different ID value.
You can achieve the affect you are going for by floating the divs. e.g.
And that should cause them to auto-wrap depending on the browser width.
Some thing very similar to what you are implementing is discussed in this article: http://www.alistapart.com/articles/practicalcss/