Design comparison
Solution retrospective
I am satisfied with the result, however I don't understand why my elements are not the same width...
If you know the answer, please let me know. 😅
It's my first React project, do you have any tips with React? Thanks!
Community feedback
- @0xabdulkhaliqPosted almost 2 years ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML 🏷️:
- This solution generates accessibility error reports, "All page content should be contained by landmarks" is due to
non-semantic
markup, which lack landmark for a webpage
- So fix it by replacing the
<div id="root">
with semantic element<main>
in yourindex.html
file to improve accessibility and organization of your page.
- What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like
<div>
or<span>
- They convey the structure of your page. For example, the
<main>
element should include all content directly related to the page's main idea, so there should only be one per page
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful0@Kure-ruPosted almost 2 years ago@0xAbdulKhalid
Hi Abdul, thank you for your feedback and pointing out accessibility errors.
I replaced the <div> to a <main> tag as you said. 😀
Happy coding to you!
0 - @RoanMacmillanPosted almost 2 years ago
Try this on the input element:
.input__txt { box-sizing: border-box; }
By default a lot of HTML elements have the value 'content-box' which means that any padding or border you add will increase the overall width of the element, so you can use border-box like above.
As for the the actual to do list element you must have a different width set compared to the input field, maybe you could look to change that. Hope this helps!
Marked as helpful0@Kure-ruPosted almost 2 years ago@RoanMacmillan
Hi Roan,
Thank you so much! I totally forgot to check the
box-sizing
property.Have a great end of the week!
1
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