I\'m trying to make a responsive square with the width size based on the (100%) height of the element. I believe it\'s impossible using only CSS.
The square width sh
Ok here the solution.
test $(window).ready(updateWidth); $(window).resize(updateWidth); function updateWidth() { var square = $('#square'); var size = square.height(); square.css('width',size); }
http://jsfiddle.net/j372H/7/