Skip to main content
  1. All Posts/

FEMentor-Ecommerce-Product-Page

eCommerce CSS

Frontend Mentor – E-commerce product page solution

This is a solution to the E-commerce product page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device’s screen size
  • See hover states for all interactive elements on the page
  • Open a lightbox gallery by clicking on the large product image
  • Switch the large product image by clicking on the small thumbnail images
  • Add items to the cart
  • View the cart and remove items from it

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Vanilla JS
  • Flexbox
  • Mobile-first workflow

What I learned

I learned a good amount of new CSS tricks while working on this project. More importantly, I learned the hard way what a pain tech debt and poor planning can be. I think if I spent a few hours planning beforehand, this project would have taken half the time it did.
In addition, I learned that it’s more important to work on making one thing perfect than trying to get a little of everything up at once.

Continued development

Going forward, I would like to focus on planning things out before diving into styling and coding. A technique I would like to employ for the next project will be to focus on one section at a time and not start something else until it is fully complete. I would also like to use React for one of these projects in the future, as I still only have a decent knowledge of the framework.

Author