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

product-preview-card-component

@brilliant-smart

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Hassia Issah 50,670

@Hassiai

Posted

Wrap the html content in a main tag<main>, <h6> with <p>, and add the alt attribute alt=" " to the img tag to fix the accessibility and error issue. click here for more on web-accessibility and semantic html Replace the <span> within the <h6> with del tag <del>, for the del tag will do the in-line styling you gave to the span.

There is no need to give the body a max-width value . To center the content on the page using flexbox, add min-height:100vh to the body. Remove the margin value from the body you can give the body a padding top and bottom value.

Add the desktop image to the div containing the mobile-image, in the mobile design , give the desktop-image a display of none and style the mobile image, in the desktop design, give the mobile-image a display of none and desktop-image display: block.

In the mobile design give .container a fixed max-width value.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

0

@brilliant-smart

Posted

I will update the corrections on git.. Btw, how do I give a max-width for columns to stop them from growing at a certain breakpoint say 992px?

0

Hassia Issah 50,670

@Hassiai

Posted

@brilliant-smart add a media query at 992px and change the max-width of .container.

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