F
F
fnq4k0amcz2t2018-04-12 18:11:25
css
fnq4k0amcz2t, 2018-04-12 18:11:25

Are the blocks the same width?

Let's say I have 2 buttons. One is 12px wide. The other one has 24. I need the width of the first button to be also 24. That is, all elements are stretched to fit the largest one. How to implement this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Aleksey Solovyev, 2018-04-12
@alsolovyev

Parent - display: flex. Buttons - flex: 1
https://jsfiddle.net/19zL1pey/1/

V
Vasily Vasilyev, 2018-04-12
@Basil_Dev

button{
min-width: 24px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question