Design comparison
Solution retrospective
I'd like some feedback on the button as I had a hard time figuring that out. I put a SVG icon within the input using label. Though it worked, the icon and text (value) aren't properly spaced as the center of the button. I assume this is because they're technically separate since icon is inside label and value is inside input. What are other methods to do this where the spacing can be better adjusted?
I'd also appreciate general feedback on CSS I've used, if there are more efficient ways. I've only started learning HTML and CSS for a few weeks so I'm sure there are many points to improve on.
Thank you!
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello there 👋. Congratulations on successfully completing your first challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML 🏷️:
<html>
element must have a lang attribute, so fix it by<html lang="en">
- Use semantic elements such as
<main>
for<div class="container">
to improve accessibility and organization of your page, it fixes accessibility error too.
CSS 🏷️:
- You can minimize the lines of code by changing the
flex
layout togrid
layout
section { display: flex; justify-content: center; align-items: center; }
- Instead nest out the
section
and rename thecontainer
div tomain
, try the following css
body { display: grid; place-items: center; }
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
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