How to proportion flex items?

  • 0
    Hello!
    I am trying to make a responsive layout, but so that the flex items are proportioned (4: 3). I've tried using the units relative to the window height / width. But on some devices, the height is greater than the width, on others it is vice versa, so this does not work. Please tell me how to implement this? Are there any examples?
    JavaScript Conner Hooper, Jul 7, 2019

  • 2 Answers
  • 0
    Start from one thing. For example:

    width: 15vw;
    height: 20vw;
    Anonymous

  • 0
    Try it through padding-bottom: 130%
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!