Skip to content

em-majowska/Challenge-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Stats preview card component solution

This is a solution to the Stats 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

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Desktop-first workflow
  • CSS @media Rule

What I learned

  • To use
    as container and to give automatic height of that image according to current width:
  .img {
    background: no-repeat url("/Challenge-2/images/image-header-mobile.jpg");
    background-size: cover;
    background-color: var(--soft-violet);
    padding-top: 73.5%;
  }
  • To center the content with viewport units and flexbox:
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}
  • To manage background property and filters:
.img {
  background: no-repeat url("/Challenge-2/images/image-header-desktop.jpg");
  background-size: cover;
  background-position: right top;
  background-color: var(--soft-violet);
  background-blend-mode: multiply;
}

Continued development

I will focus more on developing the layout with flexbox and do more research about different displays avaiable in CSS.

Useful resources

Author

  • Website - [Ewa Majowska]

About

My second project from Frontend Mentor website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors