Looking for the effective way to use flexbox
Would like to know the best practice when using flexbox.
I am attaching my code snippet and screenshot.
If anyone have a better way, plz help me.
4 Replies
Hi. I’m not clear on your question. What is it about flexbox you need help with? I’m not seeing what you are illustrating with the screenshot. It’s also helpful if you throw your code into a codepen so we can get more context and see what possible problems you are having
Thanks for your answer.
What I wanted to know is just about the best practice.
I used 2 div inside a flex box.
And i want to know if there is any other solution to not use so many divs
You can use grid which would reduce the html.
Or if you want to use flexbox, divs, sections, or I personally use UL items to group on personal projects.
Or you could use spans with the items inside it you don't want to be flex children
Looking at your code you don't need to wrap the link in a div since it's the only other element
I see, thanks