+ 2
How?
How can I get the div with id test to have a square shape and a width of 60% of the screen? How do I program the height to be the same as the width? Thanks. #transferAlert { width: 60%; height: ?????; }
2 Answers
+ 6
you can use aspect-ratio
https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio
#transferAlert {
width: 60%;
aspect-ratio: 1;
}
+ 2
Bob_Li Thank you very much. Your solution works.