Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Stats Preview Card(HTML&CSS)

Tharun Raj 1,310

@Code-Beaker

Desktop design screenshot for the Stats preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello there! I completed this project in almost 6hrs. I was able to make it look as same as possible, Except the image is still on the left side of the page on Desktop View. As I'm still getting used to CSS Grid, I couldn't figure out How I could align the image to the right side of the Container. Can anyone help me fix the image position? Thank you.

Community feedback

Mikhail 440

@MikeBeloborodov

Posted

Hello! Nicely done work. Regarding your question: you can just add

.card__img {
grid-column: 2;
}

in your desktop media query and image will take the second column, as easy as that! Also you probably shouldn't use main tag for your card. Main is a unique section for your content, it should only appear once in the document, like body. Use article or just div for your card. Good luck!

Marked as helpful

1

Tharun Raj 1,310

@Code-Beaker

Posted

@MikeBeloborodov Hi there! Thanks for your help. I was able to fix the image and it now looks complete!

Also, I would like to learn more about the usage of the <main>tag you mentioned the reply. Can you tell me more about it or share the link of an Article where I can read it?

Thank you!

0
Mikhail 440

@MikeBeloborodov

Posted

@Code-Beaker Glad it helped!

The <main> HTML element represents the dominant content of the <body> of a document. The main content area consists of content that is directly related to or expands upon the central topic of a document, or the central functionality of an application.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main

Marked as helpful

1
Tharun Raj 1,310

@Code-Beaker

Posted

@MikeBeloborodov Hi there! Saw the notification just now. I will check these out.

Happy Coding!

0

Please log in to post a comment

Log in with GitHub
Discord logo

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