@gmagnenat
Posted
Hi, congrats on completing this challenge! 🎉
I checked your repo and can give you some help to improve your solution.
At first, I thought your live url was broken because I was using my phone. The problem here, you have a fixed width of 1440 pixels on the body. This will apply for the small screen too and makes the website not responsive.
- You should not give a define width to the body and leave it to the browser.
- You should add a modern CSS reset to all your projects. It will help you with a clean starter point for writing your custom CSS. This is a good one Modern CSS Rest.
There's an easy trick to center your content using flexbox on your body.
body {
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center; /* vertical alignement */
align-items: center; /* horizontal alignement */
}
If you want you can read more about centering "divs" here and learn new tricks Center a div
On your container you are using a fixed width of 500px. You should use a max-width instead so the container can shrink on smaller screen and also you should use relative units for this.
There's a lot of information here on how to set fonts. Maybe you can find your answer? Font-family on MDN. There is a confusion in your folder and file structure. You have two style.css files. One in the css folder and one in the assets/fonts folder. In your HTML you are calling the one in the css folder but in this one you are not importing the fonts. This may help solve your font issue.
general advice: never use pixel for font sizes and everything related to fonts. This is an accessibility matter. You have to respect the user preferences. Setting fonts in pixel force the text to be always in one size and ignore user preferences. You can read about this in this great article Why font-size must NEVER be in pixels.
I hope you find my comments helpful for improving your solution and your future challenges. There are other elements to comment on but I think that's already quite some content to digest.
Don't hesitate to reach out if you have any questions.
Happy coding !
Marked as helpful
@Michael-mikeojj
Posted
Thankyou I will learn more@gmagnenat
@Michael-mikeojj
Posted
I am still having trouble with changing these fonts I don't understand it at all@gmagnenat