Created a responsive blog preview page with html and css

Please log in to post a comment
Log in with GitHubCommunity feedback
- @Blackpachamame
Greetings! you have done a great job 😎
📌 Some suggestions
- The
justify-content: center
andalign-items: center
properties in thebody
do not work if they do not have adisplay: flex
ordisplay: grid
- Apply
max-width: 100%
to yourimg
so that it occupies the correct width within the container - This
grid-template-rows: repeat(2, auto)
does nothing - You can replace the
width
ofmain
with20rem
instead of30rem
- You can use the
gap
property in thebody
to separate yourmain
from yourfooter
. Don't usebr
for this - Instead of using
margin
to center your content in the center of the screen, you can use theflexbox
properties in thebody
:
body { background: hsl(47, 88%, 63%); box-sizing: border-box; padding: 0; font-size: 16px; font-family: Arial, Helvetica, sans-serif; color: hsl(0, 0%, 50%); margin: 0; min-height: 100vh; display: flex; justify-content: center; align-items: center; flex-direction: column; gap: 20px; /* Separate the main from the footer */ }
Marked as helpful - The
Join 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