Flex is very useful and commonly used in daily development, here summarizes several common use cases:
Btw, using place-items: center
in grid layout to center an element is more elegant.
.container {
display: grid;
place-items: center;
...
}
...
Input's width is adjusted automatically.
One side's with is fixed, the other is flexible.
Thanks for your reading. Welcome to subscribe my blog by Github.