Help with expanding layout
So I'm trying to create a layout where the first element has a minimum width, and then it'll try to fit as many additional elements before starting a new line. I've attached a CodePen to help with this idea.
https://codepen.io/elad-karni/pen/oNmLBGz
7 Replies
so for the first item
- to let it grow:
flex-grow: 1
- to not let it shrink: flex-shrink: 0
- default: flex-basis: 400px
together: flex: 1 0 400px
Let me try that!
Thank you ❤️
That seems to work!!!
Now I just need to figure out how to translate that to tailwind for my project lol
Thanks again ❤️
flex-[1_0_400px]
You are too kind, but the issue I'm having is getting it to work given the rest of the css (something higher up is messing it up, but with some trial and error I should be able to fix it)
That is helpful though, ty
This is what I'm working with
It is probably messed up right now since I've been playing with it lol
I'm trying to learn tailwind
i think you want to move the flex-[1_0_400px] to the next underlaying div. But it's hard to tell without seeing the actual project