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 TailwindCSS

P

@JIH7

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


My main goal with this was to have perfect 1:1 parity with the design. If you notice anything isn't perfect, please let me know!

Community feedback

wannacode 680

@kwngptrl

Posted

Doesn't seem to work on Firefox. The image is squished to the left, occupying about 1/4 of the container. It is good on Chrome. In Firefox devtools, if I uncheck...

.w-1\/2 {
  width: 50%;
}

...then it works, but that messes up Chrome because the image occupies the whole container now.

Marked as helpful

1

P

@JIH7

Posted

@kwngptrl Thank you! I need to start testing in Firefox more often. I'll have to take a look and see if I can find a style that works for both or selectively apply style based on browser.

0
P

@JIH7

Posted

@kwngptrl Just fixed this! Thanks again. I found a way to selectively apply a style for Firefox.

@-moz-document url-prefix() {
    @media (min-width: 768px) {
        img.hidden {
            width: auto;
        }
    }
}
0
wannacode 680

@kwngptrl

Posted

@JIH7 Yup, that did the trick!

1

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