@MelvinAguilar
Posted
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
HTML π·οΈ:
- Use semantic elements such as
<main>
and<footer>
to improve accessibility and organization of your page.
- Always avoid skipping heading levels; Starting with <h1> and working your way down the heading levels (<h2>, <h3>, etc.) helps ensure that your document has a clear and consistent hierarchy. Source π
CSS π¨:
- You should use the
box-sizing: border-box
property to make thewidth
andheight
properties include the padding and border of the element. This will make it easier to calculate the size of an element. You can read more about this here π.
- Setting the width of the component with a percentage or a viewport unit will behave strangely on mobile devices or large screens. You should use a max-width of
320px
or20rem
to make sure that the component will have a maximum width of320px
on any device, also remove thewidth
property with a percentage value.
-
Consider centering your element using either a grid or flexbox layout for more precise and responsive centering.
For Flexbox:
body { min-height: 100vh; display: flex; justify-content: center; align-items: center; /* Additional styles if needed */ }
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
@knast
Posted
@MelvinAguilar Thank you for really detailed response and tips! I will surely implement them when I find time. I wish you happy coding too!