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
No description
3 Replies
Tok124 (CSS Nerd)
First of all, you don't need grid-template-rows:1fr; and also, to fix the issue, set img to display:block;
Ahmed Ibrahim
Ahmed IbrahimOP3mo ago
it works❤ i spend 1 hour trying to fix this , thanks alot
Tok124 (CSS Nerd)
No problem 🙂
Want results from more Discord servers?
Add your server