@Souicia
Posted
Hello Jacob,
Congratulation on finishing this design.
Because there was a lot of possible improvements to your original code, I forked your entire project (which created a repository of your project onto my account), here's the link: https://github.com/Souicia/3-col-car-component-improvement
Now to answer your specific questions. While @AtulKumar0001 answered correctly on the third question and with good details, I will explain the two first.
The simplest answer to first question is to simply use height: auto on your .container-sub. This will automatically fit all the content inside the container.
The answer to your second question is to avoid flex-wrap. Flex-wrap will make the containers jump to a new line if the space of the parent container becomes too small for all of them to fit.
For the third question, read Atul answer.
For more improvements, check my fork of your project and compare my code with yours. If you have any questions, please feel free to reply to this message.
I wish you a great day :)
Marked as helpful
@Jacwilalasey
Posted
@Souicia Thanks Leo, this is really helpful! Much appreciated!