I am using HTML5 and CSS3 to make a layout.
I need tiles on the page, which is a square div element. the tile is inside a bootstrap column, I need the width to be automatically match the column width, but I found it difficult to let the height = width, because width is a percentage value: 100%.
HTML:
...
<div class="col-md-2">
<div class="tile tile-square tile-auto">
...
</div>
</div>
...
CSS:
.tile-square{
width: 100%;
height: how to do this?
}
I am OK with jQuery/js solution, but I prefer using CSS3 to solve this alone. there is a "calc()" statement in CSS3, but I do not know if it can achive this functionality.