overflow-x div child width


I’m trying to find a solution for this case:

I have a div container with a static width and overflow-x: auto; 2 child divs, one of them has fixed width, the other one doesn’t.

How can I make div without width to have same width as parent?

Here’s an example:



I found the solution in 2022 🙂

#parent {
    display: grid;

Answered By – no1lov3sme

Answer Checked By – Marie Seifert (AngularFixing Admin)

Leave a Reply

Your email address will not be published.