Design comparison
SolutionDesign
Solution retrospective
I'm pretty sure that the <section>
parts can be simplified. How should I do? Also, do I need to fix something?
Any feedback welcome!
Community feedback
- @birkaanyPosted about 2 years ago
Hello Rafael, congrats for completing the challenge!
To answer your question, I see that you're using section to group every line in the design. That is a bit unnecessary. Let's have look;
- section.user is grouping to line up "Victor Crest" and "26" by setting display to flex. Instead of this, <h1>Victor Crest <span>26</span><h1> would work. Which you don't need display flex property for this one. You can style span by selecting it "h1 span{...some style}"
Example HTML;
<section class="userInfo"> /*userInfo has display flex and flex-direction:column*/ <h1>Victor Crest <span>26</span><h1> <p>London</p> </section> <ul class="stats"> /*display:flex*/ <li>80K<span>Followers</span></li> /* also every li element should have display flex, direction column*/ <li>803K<span>Likes</span></li> <li>1.4K<span>Photos</span></li> </ul> I hope this helps a little bit
Marked as helpful1@rafael-holandaPosted about 2 years ago@birkaany Thank you for the clarification, I was really confused about that.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord