C
C
Cheizer2021-02-25 19:43:34
css
Cheizer, 2021-02-25 19:43:34

How to make blocks of the same height and width in one row for any block width?

Greetings, please tell me how to make blocks of the same height and width when changing the screen width?
What would be proportionally reduced without transfer to the second line.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Martynkevich, 2021-02-25
@Cheizer

Here are my implementation examples:
1) Minimum width 75px
2) Minimum width + height depends on the width of the circle
You can specify the width in%, then the button will have flex: 0 0 20%, or you can specify the minimum value (For example 75px).

S
Softlink, 2021-02-25
@Softlink

You can use the new aspect-ratioone with fallback before the padding hack https://jsfiddle.net/4kopLx87/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question