Skip to content

This is my solution for the challenge Sunnyside Agency Landing Page provided by Frontend Mentor.

Notifications You must be signed in to change notification settings

vitorp4/sunnyside-agency-landing-page

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sunnyside Agency Landing Page

This is a solution to the Sunnyside agency landing page 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 for the site depending on their device's screen size
  • See hover states for all interactive elements on the page

Screenshot

screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • Flexbox
  • CSS Grid
  • CSS Media query

What I learned

  1. Use the link tag with the attribute rel="preconnect" to establish the connection with google fonts in advance
<link rel="preconnect" href="https://fonts.googleapis.com" />
  1. Use object-fit to make the image cover the container
.header-content > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
}
  1. Use media query and display property to switch between desktop and mobile images (but this ins't the best approach)
.img-mobile {
  display: none;
}

@media screen and (max-width: 500px) {
  .img-desktop {
    display: none;
  }

  .img-mobile {
    display: block !important;
  }
}

Continued development

I'm still not comfortable with using media query and grid layout to make the UI responsible. I will start another challenge in Frontend Mentor trying to focusing on this CSS features.

In addition I recently discovered the picture and source HTML tags and I will use this tags in my next projects. This is an better approach when compared with using multiple img tags with different sources for each screen size.

Author

Acknowledgments

I'm so grateful to all the users of Frontend Mentor who constantly gives me feedbacks. Thanks.

About

This is my solution for the challenge Sunnyside Agency Landing Page provided by Frontend Mentor.

Topics

Resources

Stars

Watchers

Forks