0
I’d like to put as much as Rectangle possible within the mainDiv, and then centralize the mainDiv horizontally.
For example, in this image we can see eight Rectangle within the mainDiv, however has a space on the right side, I would like to centralize the mainDiv, to leave the same margin on the right and left side
<div id="mainDiv" >
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
<div id="Rectangle" style="width: 200px; height: 300px; background: #4d5f8d; margin-left: 20px; margin-top: 30px; float: left;"></div>
</div>

explain this better
– Felipe Duarte
@Felipeduarte I already asked the question.
– Lucas Caresia