Design comparison
Solution retrospective
hey there. uh, this is my solution to the article preview component challenge. I had a few challenges making the image fit its div and also a little problem making the responsiveness a bit more seamless. feel free to look through my code: suggestions and constructive criticism is welcomed. thank you! <3
Community feedback
- @fraserwatPosted almost 3 years ago
Hey, good stuff!
Would wrap the button element for the pop out menu in a <button> element. Good for accessibility, you can tab to it and it'll allow you to put a background on it.
Also look into how you can use padding to avoid having to set explicit widths. Especially when you have loads of components on the same screen, you want to be stating the exact heights and widths of things as little as possible so that everything can be responsive at different screen widths.
e.g. the "text" div (i'd have this as a class, not an id btw), if you set left and right padding here you can get rid of the explicit
width
andmargin
attributes on the header and p elements.Keep up the good work!
Fraser
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