K
K
Kirill2021-12-23 18:20:27
css
Kirill, 2021-12-23 18:20:27

How to make sure that the flex container does not overflow and truncate ("...") is added to the text?

https://codepen.io/Lirrr/pen/yLzzxQW

61c493495fbbc493988551.jpeg

I want the yellow and pink blocks to not overflow the green, and also the yellow block to hide the extra text behind the “…”. It seemed to me that I registered all the styles for this, but it does not work. Perhaps due to the indefinite width of the block with text, but I do not want to define it with a specific value, otherwise the adaptive flexibility will be lost.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Ankhena, 2021-12-23
@Lirrr

Replace flex with grid

display: grid;
  grid-template-columns: min-content 1fr;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question