@oshudev
Posted
Hello there 👋. Good job on completing the challenge !
Here are my basic suggestion for you to improve on:
- Create a basic css reset so that it's to work on styling. Here is an example:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
This snippet allows you to reset browser default for margin and padding. If you notice there is box-sizing
that is included. The CSS box-sizing property allows us to include the padding and border in an element's total width and height. You can read more here if you are interested.
- In terms of HTML structure, I suggest you group elements to create a well structured HTML semantic. You can check my solution to understand what i meant. It will be easy for you to layout and style webpage or components if know how to structure HTML properly.
This section is css specific suggestions:
- You should declare
font-family
in thebody
tag. It also should have a fallback font just in case your primary font don't work, e.g.font-family: 'Figtree', sans-serif
. - If you want to define
margin
orpadding
to only left and right, you can usemargin-inline
orpadding-inline
. Similarly if you want to definemargin
orpadding
to only up and down, you can usemargin-block
orpadding-block
. - Instead of declaring
margin
orpadding
like thispadding: 8px 15px 8px 15px;
, you can rewrite it topadding: 8px 15px;
.
You can re-generate your screenshot to reflect the latest changes.
I hope you find it useful! 😄
Happy coding!
Marked as helpful
@gmatt20
Posted
@oshudev thank you very much! Your suggestions and solution are tremendously helpful and I am grateful for your help. Please come back when I post another solution! :)