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-card-component

@Jeryr

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


What are you most proud of, and what would you do differently next time?

I am delighted i could get to this stage.

What challenges did you encounter, and how did you overcome them?

I had challenges trying to give the first paragraph which is "PERFUME" some letter spacing of like 5px, so it would go well with the demo but i could only do it using the p {} and it didnt work if i used p:nth-of-type (1) {}. I am still confused on how to get it to work

What specific areas of your project would you like help with?

How to work with media queries and css grid.

Community feedback

@saularanguren

Posted

Greetings, your solution is really impressive, however we can improve it as follows: instead of using <div class="container"></div>, use <main class="container"></main > and instead of using <div class="left-container"></div> instead use <figure class="left-container"></figure>, In this way you use semantic html, I recommend eliminating the following blocks of code to have a cleaner, orderly and professional project:

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

<div class="attribution">
        Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>
        Coded by <a href="#">Jeremiah B. Ogunfuye</a>
</div>

your index.html file should look like this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="./Images">
    <title>Product Preview Card Component</title>
    <link rel="stylesheet" href="styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-*************" crossorigin="anonymous" />
</head>
<body>
    <main class="container">
        <figure class="left-container">
            <img src="./Images/image-product-desktop.jpg" alt="desktop-product-image">
        </figure>
            
        <div class="right-container">
            <div class="content">
                <p>PERFUME</p>
                <h1>Gabrielle Essence Eau De Parfum</h1>
                <p>A floral, solar and voluptuous interpertation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL. </p>
                    
                <div class="price">
                    <span>$149.99</span>
                    <span>$169.99</span>
                </div>
                <button class="cart-btn"><i class="fas fa-shopping-cart"></i><a href="#"> Add to Cart</a></button>
            </div>
        </div>
    </main>
</body>
</html>

happy coding 😁

Marked as helpful

0

@Coding-is-fun12345

Posted

I liked the way you were able to solve the problem

2

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