Skip to content

hattami98/3-Column-Preview-Card-Component-using-Grid

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/desktop.png

Links

My process

In this challenge, I'm only using vanilla HTML and CSS to work with the solution. My goal is to be as close as possible as the design. First, I put the design pictures to Figma to measure the layout. Then, I code the structure of the page. After that, I code the stylesheet. I managed to implement hover states to the buttons easily. The challenge came when I tried to apply my measurement to my code. I tried Flexbox at first, but it was difficult to get the satisfying result. Suddenly it became a hard math. As I lost my track, I reorganized my code into Grid. I used Grid not only for the elements, but also the white spaces as well.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • CSS Grid

What I learned

In this challenge, I learned how powerful is the Grid system. I managed to use Flexbox before this one, but the code was messy. Using Grid system, I can apply my measurement easily and code more orderly.

Continued development

I want to improve my understanding of using HTML and CSS in general and from this challenge, specifcally Flexbox and Grid. Although in this challenge I found it is easier to use Grid, I think Grid by no means is an overall solusion to layouting.

Useful resources

Author