@Blackpachamame
Posted
- I recommend doing a small reset to the styles that come by default in the browsers. To do this, you can apply a couple of properties to the universal selector
*
, with this you will make your site look the same in all browsers:
* {
margin: 0;
box-sizing: border-box;
}
- You can apply
display: block
to the image to remove the white space generated underneath - I leave you the task of researching the
reset CSS
and thebox-sizing: border-box
- If you want to center the content in the center of the screen and keep the footer below it, you can apply these changes to your
body
:
body {
font-family: "figtree";
background: hsl(47, 88%, 63%);
display: grid;
grid-template-columns: repeat(16, 1fr);
grid-template-rows: 1fr auto; /* new */
min-height: 100vh; /* new */
}
To improve semantics, you can change the following:
<div class="card">
por<main class="card">
<div class="attribution">
por<footer class="attribution">
Marked as helpful
@shubham-cj
Posted
@Blackpachamame
Hey! Marcos
Thank you for your feedback it was really helpful. I have made the code changes that you told me π
Can you please help me again, in feedback you said that π
You can apply display: block
to the image to remove the white space generated underneath
But I can't get it, can you explain this again where should I use display: block
property and where does white space appear?
@Blackpachamame
Posted
@shubham-cj Oh! An apology haha is that that space cannot really be seen with the naked eye in this case. I think this video will make it clearer to you: Get rid of that small space under your images
Although in this case it is practically not noticeable, it is not necessary for you to apply it. But keep it in mind because you will probably need it at some point.
Marked as helpful
@shubham-cj
Posted
@Blackpachamame
Oh! This is insightful I had no idea about it, but Now I understand your point. I'll use this in the upcoming projects. Thank you!!π€