I have a set of 70 square div elements within a container box (and 10 containers). I want to have a breakpoint at every 7th div element so i end up with 10 rows of 7 divs. The squares should have a thin margin. I have set the element width to 13.68571428571429% reseving the rest for the margin.
How can i achieve that the height adjusts to the width so i always get 7 squares in a row equal in width and height based on percentage?
Have tried Javascript but it renders too long with 700 squares. Flexbox seems to be compatible only on newer browsers (we still have decent amount of users on older browses).
Here is my html:
<div class="wrapper">
<div data-ng-repeat="square in [] | rangeFilter:1:70">
<div dir-square current-wrapper="{{wid}}" current-square="{{sid}}" class="square">
{{square}}
</div>
<div class="clearfix" ng-show="square % ctrl.Breakpoint == 0"></div>
</div>
</div>