if you want to make website more flexible, I recommend to use vw, dvw for width and vh, dvh for height. Additionally for ensuring constant ratio, using aspect-ratio : property. (e.g. aspect-ratio : 1 / 1 this ensures 1 by 1 ratio)
refs:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/length#vw
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/aspect-ratio
if you want to make website more flexible, I recommend to use vw, dvw for width and vh, dvh for height. Additionally for ensuring constant ratio, using aspect-ratio : property. (e.g. aspect-ratio : 1 / 1 this ensures 1 by 1 ratio)
refs:
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/length#vw
https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/aspect-ratio