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

Using external CSS

P
Nohelynaid 180

@Nohelynaid

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I am a begginer here so I find it difficult to change the mobile layout setting. I doucle checked the meta tag but I am not fully aware of the @media. I am truly unsure of that part.

Besides, I know it isn't quite the same, yet I was having trouble finding the shopping cart icon.

I am definitely gonna need feedback overall.

Community feedback

Hassia Issah 50,670

@Hassiai

Posted

wrap <div class="first-container"> and <div class="second-container"> in the main tag and <div class="attribution"> in the footer tag to fix the accessibility issues. click here for more on web-accessibility and semantic html

To center a content on a page, add min-height:100vh; display: flex; align-items: center: justify-content: center; or min-height:100vh; display: grid place-items: center to the body. Example : centering .container on the page.

To center .container on the page using flexbox:
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
To center .container on the page using grid:
body{
min-height: 100vh;
display: grid;
place-items: center;
}

You can use flexbox to design both the mobile and desktop design. in the desktop design, give the main a width value and display: flex and give .first-container and .second-container a width of 50%.

in the mobile design give the main a max-width value for a responsive content and give both first container and .second-container a width of 100%. you can acheive this using media query, for more on media queries,click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

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