Profile card component main - HTML & CSS Flexbox, Grid & No JS
Design comparison
Solution retrospective
Hey there! If u have any advice regarding image positioning or if u think I could've done something different let me know.
Community feedback
- @vanzasetiaPosted about 3 years ago
πHi Pop Andrei!
Thanks for leaving your kind words on my solution π.
Some feedback on this solution:
- I would not recommend to limit the
height
of thecard
. Let the content inside it control the height of it. - I notice that you often use
%
percentage units. I would recommend to userem
orem
instead to make the size consistent among devices. - I would highly recommend to use
details
andsummary
tag instead of input tags. - You don't need to specify the
height: 100%;
of thebody
andhtml
elements, it's unnecessary. - For the card images, what I did, I used
img
element for overflowing images and use CSSbackground-image
for the rest of it. To position it, in my opinion there's no the exact way to do it, since it all depends on your HTML markup and the way you position it. So, try hacking around until you think that the position similar to the design.
That's it! Hopefully this is helpful!
Marked as helpful1 - I would not recommend to limit the
- @thisisharshjainPosted over 3 years ago
Heyyy pccipru, Nice work man! Making this in vanilla HTML CSS is another challenge and you did great. I found a few small issues:
- If i click all accordions then top and bottom one's are cut (You can either increase height of container accordingly or maybe wrap all accordions inside a div and set overflow-y to auto)
- Below 1200px width the image on left doesn't stays in center
- On mobile screens, give .text-container a little padding. That will look little better Everything else looks good to me π Keep grinding πͺπ»
Marked as helpful1@pccipriPosted over 3 years agoThanks a lot for the review and thanks for taking time to look over my solution @thisisharshjain. I will sort those little bugs out and i'm thinking of trying to do this with JS too or try a framework. If u have any advice regarding what to learn next let me know, and yeah I will keep grindingπ.
0@thisisharshjainPosted over 3 years ago@pccipru Yeah definitely try this using JS. Learn JS and then practice by completing challenges here, that will help a lot! After you're confident enough with vanilla JS then try learning a framework. Good luck πππ»
Marked as helpful0
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