Skip to content

Remaking a product preview card layout - WORK IN PROGRESS

Notifications You must be signed in to change notification settings

hran-8/Product-Preview-Card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Product preview card component solution

This is a solution to the Product preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size
  • See hover and focus states for interactive elements

Screenshot

Links

My process

I started with the mobile layout first. I created classes and added some semantic HTML elements as needed. I tried to do all the visual styling first, like colors, backgrounds, and font families. Then, I moved to positioning and then margins/padding/sizing. I struggled a bit when I tried to move onto the desktop layout because the image wasn't scaling properly alongside the container. I'm still struggling with this.

Built with

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

What I learned

I learned a lot about workflow. I would previously start out trying to make the desktop version and downsizing it, but it is much easier to start mobile. I also learned how to keep things as responsive as possible by using relative units rather than pixels, although I'm still having trouble. Using different images depending on the width of the viewport was also new to me and I learned about the srcset attribute.

Continued development

I still struggle with responsiveness; my website breaks when the viewport width is anywhere between 375px and 1440px. I want to find a solution to this without making a bunch of media queries.

Useful resources

  • Kevin Powell's tips for beginners on his YouTube channel really helped me understand the workflow better and start projects with more organization.
  • Viewing MDN for properties and values I wasn't sure about/forgot was useful.

Author

  • Website - [H.L.] (no website yet)
  • Frontend Mentor - @hran-8
  • Twitter - @hran_8

About

Remaking a product preview card layout - WORK IN PROGRESS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published