design issue
i want to make both the image and the text box in the same line from buttom .
the code
.main {
width: 600px;
padding: 10px 20px;
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr;
}
.image-box img {
width: 280px;
height: 400px;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}
.text-box {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
background-color: var(--white);
padding: 20px;
}
Image
3 Replies
First of all, you don't need grid-template-rows:1fr; and also, to fix the issue, set img to display:block;
it works❤ i spend 1 hour trying to fix this , thanks alot
No problem 🙂