Design comparison
SolutionDesign
Solution retrospective
I'm learning react and that's why I haven't spent much time on CSS. I have had problems with the display, I don't know how to get the image to show on the button. I appreciate the feedback!
Community feedback
- @jakegodsallPosted 8 months ago
Hi 👋
Great work with this. It looks really good! I ran your code locally and the image is displaying in the button. Did you manage to fix this?
In terms of other feedback:
- You are including your
node_modules
directory in your git repository which is generally bad practice. You can reverse this by includingnode_modules/
in the.gitignore
file in the project directory. Then, rungit rm -r --cached node_modules/
to remove it from your local Git repository whilst keeping it in the working directory. Create a commit and push it to GitHub to then remove it from the remote repository on GitHub. - At present your component is exhibiting a minimum width behaviour that is causing it to overflow the viewport at widths less than 550px. Although you haven't explicitly set a
min-width
orwidth
for the component, this is being calculated as the sum of the width of your inputs and themargin-right
set to the right of them. A better approach would be to set a %-based width on the outer container and amax-width
at 550px. This way, at larger viewports you will get the desired width, but at smaller viewports you won't have this overflow behaviour.
Building responsive components can be difficult at times. If you want to learn more about how to do this I would highly recommend Kevin Powell's free course Conquering Responsive Layouts.
Hope this is helpful! Keep up the great work.
Marked as helpful0 - You are including your
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