I know similar questions have been asked before but I haven't seen one where the parent div has an unknown width with a definitive answer.
So here's the situation.
<style>
.parent {
width: 100%;
}
.child {
width: 300px;
float: left;
}
</style>
<div class="parent>
<div class="child></div>
<div class="child></div>
<div class="child></div>
<div class="child></div>
<div class="child></div>
<div class="child></div>
...
<div class="child></div>
<div>
Basically, I want to fit as many child divs in the parent container as the user's screen resolution can support.
I don't want to use css3 media queries because I want to support IE7.
I tried using javascript to specify a width to the parent but it's not ideal as the content jumps to the center after it loads. Any ideas?