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 using HTML ans CSS(Flex)

Taskin Sultanaβ€’ 190

@TaskinSultana

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


Another challenge done...Though I totally loved it...but I have faced few issues too....Like I don't know how to use two image url in img tag....if I'm using background property in image then I can change the image url in mobile view using media query...but how to change the url while using img tag???? Please let me know how to do it....It will be helpful if u can give me some suggestions to improve img tag... Please do tell me if i have made any mistake....and I'd be grateful if you can give me some feedbacks to improve πŸ™

Community feedback

Adrianoβ€’ 34,090

@AdrianoEscarabote

Posted

Hi Taskin Sultana, how are you?

I really liked the result of your project, but I have some tips that I think you will like:

About using two images in the img tag, this is not possible, either you can use background-image or use the picture tag I will leave a link for you to read more about:

click here to read about it

the rest is great, I really liked the background color you used!

Hope it helps...πŸ‘

0

Taskin Sultanaβ€’ 190

@TaskinSultana

Posted

@AdrianoEscarabote Thank you :)

0
Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHello Taskin Sultana, Congratulations on completing this challenge!

Amazing solution and great design! I liked a lots the colors. Here's some tips for you:

1.Align vertically the text content with display: flex:

.text {
    display: flex;
    background-color: hsl(0, 0%, 100%);
    padding: 10px 35px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

2.THE PICTURE TAG is a shortcut to deal with the multiple images in this challenge. So you can use the <picture> tag instead of importing this as an <img> or using a div with background-image. Use it to place the images and make the change between mobile and desktop, instead of using a div or img and set the change in the css with display: none with the tag picture is more practical and easy. Note that for SEO / search engine reasons isn’t a better practice import this product image with CSS since this will make it harder to the image. Manage both images inside the <picture> tag and use the html to code to set when the images should change setting the device max-width depending of the device desktop + mobile.

Check the link for the official documentation for <picture> in W3 SCHOOLS: https://www.w3schools.com/tags/tag_picture.asp

✌️ I hope this helps you and happy coding!

0

Taskin Sultanaβ€’ 190

@TaskinSultana

Posted

@correlucas Thank You :)

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