C
C
Cheizer2019-07-13 01:17:05
css
Cheizer, 2019-07-13 01:17:05

How can I undo the stretching of a FLEXBOX child element?

Friends, there is a flexbox block, it has two nested elements, one is a button and the other is with content. They are both stretched to the full width of the parent. QUESTION. How to stop stretching to the full width of a button?
I don't want to give it a fixed width. It has its own content text, it should stretch along it.
https://codepen.io/Cheizer/pen/wLZQLy

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Timoshko, 2019-07-13
@Cheizer

align-items: flex-start;
Read more here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question