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 page using html and css

nikhil149 50

@nikhil149

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


Can some one help in fix any issues

Community feedback

@joecobb

Posted

@nikhil149 That's a great first attempt! I just want to make few suggestions which will make your solution even better.

  1. You can add the following css to your to properly center your product-container. It will place the product-container right in the middle of the body.

body{ justify-content: center; height: 100vh; }

  1. Usually all fonts and colors, et cetera used in the design are all in the style-guide.md file. If you view the file, you will realize that two fonts are used.

All the fonts can be found at fonts.google.com. For convenience sake I will put a link here which you include in the head of you document. It has all the two fonts.

<link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],700&family=Montserrat:ital,wght@0,500;1,700&display=swap" rel="stylesheet">

Use font-family: 'Fraunces', serif; for the bold title as well as the price. and Montserrat for all others.

Marked as helpful

0
Melad 220

@melad99

Posted

First To center the page you can use this CSS properties for the main div for the card .class-name{

    position: absolute;
top: 50%;
left: 50%;
transform:translate(-50%, -50%) ;

}

-then for the price, you should give it a color with CSS

Also for the title, you can give it a width so it is like the design I hope that will help and I'm here for any questions

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