@Adel-Harrat
Posted
Hello and congratulations on completing this challenge! 🎉✨
I have downloaded your code and made some modifications that I believe will make your solution even better. Here are the changes:
-
Change the
<h1>
tag to a<div>
tag (line 33). -
Comment out the attribution code because it is ruining the alignment of the card.
-
Remove the
margin: 200px 400px;
from the.main-page
CSS. -
Add the following CSS to the body:
body {
display: grid;
place-items: center;
min-height: 100vh;
}
- Add the following CSS to the top of the general.css file:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
- Change the
width
property tomax-width
in the.main-page
CSS:
.main-page {
max-width: 1087px;
}
-
Add the
.image-wrapper
class to the div that holds the images. -
Add
flex: 1;
to the.image-wrapper
CSS. -
Remove the
width
property from the.page-text
CSS. -
Add
flex: 1;
to the.page-text
CSS.
I didn't know how to make the image more responsive or why object-fit doesnt work
My github repo for this code : github.com
These modifications should enhance your solution. Let me know if you need any further assistance! 🎈
Marked as helpful
@BBualdo
Posted
@Adel-Harrat Thank you so much! It helped a lot, I updated the solution. But it still has a small gap under the image, I don't know why.
If you could tell me as simple as possible, how to use 'flex: 1' property? :) I know what it does, but can't use it properly on my own.