Blog von Marc Hinse, Webdesigner und Webentwickler aus Karlsruhe.

made my day.every day.

Webdesign Karlsruhe Blog

Height equals width with pure CSS

I was looking for a solution for flexible elements which remain the aspect ratio when resized. Until now I used some Javascript for resizing the elements. But using the resize event and recalculate the height of an element is some kind of nasty and never felt right. Recently I found a solution in an article from A List Apart and a topic on StackOverflow, which works quite well.

mehr davon
Nach oben