Coder Social home page Coder Social logo

shashreesamuel / single-price-grid-component Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 161 KB

This is a solution to the single-price-grid-component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects

Home Page: https://single-price-grid-component-red-eight.vercel.app

HTML 47.87% CSS 52.13%
frontend-mentor frontendmentor frontendmentorchallenge

single-price-grid-component's Introduction

Frontend Mentor - Single price grid component solution

This is a solution to the Single price grid 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 for the component depending on their device's screen size
  • See a hover state on desktop for the Sign Up call-to-action

Screenshot

Links

My process

Built with

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

Note: These are just examples. Delete this note and replace the list above with your own choices

What I learned

This challenge allowed me to have a greater exposure to css grid since I never used it at this point however after watching some youtube tutorials by Kevin Powell and reading articles on CSS Tricks which included "A Complete Guide to CSS Grid" my direction was established while attempting this challenge and I found it easier to achieve the desktop layout.

The approach for coding the desktop version was to firstly establish how many columns were necessary in order to achieve the layout which resulted in a count of 2 columns. Secondly, in order to have the top-level container spanned across two columns, the css declaration grid-column: span 2 would need to be specifically added on the respective class. The last step would be to have the bottom-level container divided into two equal sub-containers which meant that the containers would have to occupy the grid locations of 1, 2 and 2, 2 respectively.

I found it difficult to understand how exactly I am changing the top-level container from the desktop version where it spanned two columns to the mobile version of occupying only one column. This was a frustrating process however it dawned upon me that maybe if grid-column: span 2 would be used to span two columns then what would be the result of grid-column: span 1 which did exactly as I wanted.

Continued development

I plan to try using css grid as much possible in order to become more comfortable with all of its various properties and its use cases in addition to attempt more css grid challenges to level up the complexity.

Useful resources

  • CSS Tricks - CSS Grid - This helped me with the flexbox concept and I am really glad to be recommend this article, will use it going forward.

  • MDN CSS Reference - This is the guide to all the css properties with an indept explanation. Definitely recommend it.

Author

single-price-grid-component's People

Contributors

shashreesamuel avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.