<div class="container">
<div class="row">
{% for object in objects %}
<div class="cell">{{ object }}</div>
{% if forloop.counter|divisibleby:3 %}
</div>
<div class="row">
{% endif %}
{% endfor %}
</div>
</div>
.container {
display: table;
}
.row {
display: table-row;
}
.cell {
display: table-cell;
}