Hi, I have a CSS question. There are two columns, the right (B) column has a fixed width of 100px and the left (A) column must fill the remaining width. Additionally, within column A, there is a list of subcomponents added horizontally.
The problem is that when adding child components, the width of column A becomes longer and column B becomes lower.
How can I add a subcomponent to the bottom line of column A if it exceeds the width of column A?
You can use display grid instead of Flex. Using the grid, you can define whether an item is dynamic or static.
Example:
grid-template-columns represents a free space, which means that all space except 100px of the second element will be filled by the first element.
Use flex-wrap on both the entire container and A, and set the width of the A box to calc(100% - 100px).