I'm looking for a way to align divs
to the left, however, keep them divided into groups, without a group breaking the line. The code below comes close, but I would like to get the result of the image.
.group {
border-width: 1px;
border-style: solid;
border-color: #008040;
overflow: inherit;
padding:5px;
float:left;
margin-left: 5px;
margin-top:5px;
}
.machine {
float: left;
border-color: red;
height: 75px;
width: 50px;
border-width: 1px;
border-style: solid;
box-sizing:border-box;
}
<div id="group1" class="group">
<div id="subDiv1" class="machine">1</div>
<div id="subDiv2" class="machine">2</div>
<div id="subDiv3" class="machine">3</div>
<div id="subDiv4" class="machine">4</div>
</div>
<div id="group2" class="group">
<div id="subDiv1" class="machine">1</div>
<div id="subDiv2" class="machine">2</div>
<div id="subDiv3" class="machine">3</div>
<div id="subDiv4" class="machine">4</div>
</div>
<div id="group3" class="group">
<div id="subDiv1" class="machine">1</div>
<div id="subDiv2" class="machine">2</div>
<div id="subDiv3" class="machine">3</div>
<div id="subDiv4" class="machine">4</div>
</div>
The above code gives me this result (CURRENT):
ButIwouldliketogetthisotherresult(DESIRE):
Is it possible?