Design comparison
Solution retrospective
Second project finished "Single Price Grid Component" as a beginner, I was struggling with the footer because I couldn't place it at the bottom, that's why it's gone T_T
PSDT: I know it doesn't look centered, it's that in Netlify it came out one way and in the live server it came out another, I tried to adjust it for Netlify but it got out of adjustment again here.
Community feedback
- @VCaramesPosted about 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
The reason why your component is not properly centered is not because of the Netlify but because you did not use the correct properties.
To center you content to your page using CSS Grid, add the following to your Body Element:
body { min-height: 100vh; display: grid; place-content: center; }
You can use those properties to align all your components. (You can also use Flex)
-
The purpose of the Main Element is to identify the main content of your page. It is not the container of you component. After the main element, you want add a container to wrap you separate components in.
-
The *<h1> Heading can only be used once per page. In your component, you used it for all your headings.
If you have any questions or need further clarification, let me know.
Happy Coding! 👻🎃
Marked as helpful1 -
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