The calc() function is not working as I expected it to in my code.
Instead of the height being calculated to 20% of the container's width, the height is collapsing.
html:
I've tried adding a calculation, like "height: calc(20% - 0px);" but the height is still just collapsing to zero.
Can anyone see if I am doing something wrong? Thanks!
just put
height:0; padding-top:100%;
The padding is taking it's calculations from the width of the element.