Skip to content

matiaslagoevia/preview-card-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - 3-column preview card component solution

This is a solution to the 3-column preview card component 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 depending on their device's screen size
  • See hover states for interactive elements

Screenshot

Screenshot of my submission

Links

My process

Built with

  • Semantic HTML5 markup
  • Flexbox
  • Mobile-first workflow

What I learned

  • Flex approach to center main content and footer helped on this too
  • Flex items' images have align-self: start implicitly, stretching them
  • Font-sizes in rem, everything else (padding, margins, etc) in em
  • Styling buttons with :hover pseudoclass
  • Controlling flex containers' direction & wrap with flex-flow
  • Specifying max-width alongside width for containers to prevent them growing too much
  • Using margin: 0 auto to center content horizontally
  • VSCode "wrap with component" snippet helped me be more productive

Continued development

I'm happy I'm continue to explore flexbox and it's usage, and look forward to doing so. Also, the ability to visually determine how I want to split up the HTML markup and apply styles, differentiating between margin/padding/etc., and continuing to grow my experience in this.

Useful resources

Author