I have a root container that is 100%
width and height. The root container is overflow-x:scroll
.
Inside the root container is another container which has n
number of fixed width elements. The container is display:grid
with grid-auto-flow:column
The problem I have is that the container does not expand to fill the width of its children elements. This is evident when setting a background to the container. When the root container scrolls, the containers background cuts off.
You can see this clearly in the following codepen.
https://codepen.io/ozzyg/pen/YzObrqM
How would I get the container to be the width of its children?
2
Answers
I’m trying to decipher what your asking based on your question without specifics. If you could add in some class names your referring to it would help, but I think what you want is the following.
declare the width of your
.kalendar-dates
container. I would useAdd
display: flex;
to.kalendar
: