Responsive 3 Column Preview Card - Hover Effect, Media Query
Design comparison
Solution retrospective
-
Used custom properties to define the colors. This will allow me to change all the colors just by making changes in the custom property itself, and that will flow down to all my CSS declarations
-
Went with a mobile first approach. This allows the simpler layout (mobile) to be the main layout, and then less declarations need to be made in the media query
-
In the hover effect, the background color needs to match the background color of the corresponding card. I used the 'inherit' function on the background color so that it will take on whatever background color assigned to its respective ancestor
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