Keep up aspect ratio of a div with CSSAsk a question
I want to create a
div that can change its width/height as the window’s width changes.
Are there any CSS3 rules that would allow the height to change according to the width, while maintaining its aspect ratio?
- 0What is the best way to align elements to vertically center in CSS
- 0css: how to increase one character font-size without increasing whole text line-height?
- 0CSS Grid container does not taking the width of its children
- 0How to keep a flex container all in one page without scroll
- 0Hover effect on div and image is not working in css
- 1How do I add a counter to show how many times a div element has been clicked?
- 0How to hide container div title when hovering inner elements?
- 0Make css animation smoothly loop forever
- 0How to avoid an image overflowing container in CSS Grid?
- 1Is it possible to make every second row in a CSS Grid to have different number of columns?
- 0How to change checkbox's border style in CSS?