Skip to content

This repository contains my solution to the Frontend Mentor Blog Preview Card challenge. The project was developed using HTML and CSS, focusing on responsive layout techniques with CSS Grid and Flexbox.

Notifications You must be signed in to change notification settings

lia-oliveira/blog-preview-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Blog preview card

This is a solution to the Blog preview card 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:

  • See hover and focus states for all interactive elements on the page

Screenshot

Expected solution:

Design preview for the Blog preview card coding challenge

My solution: Card Solution Screenshot

Links

My process

Built with

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

What I learned

  1. How to use the tag to center the card.
body{
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
  1. How to make the mobile version take up the full width of the screen.

Taking into account that the card spans 4 columns in the original design.

main{
    grid-column: span 4;
}
  1. How to keep the image from overflowing the container.
main img {
    width: 100%;
    object-fit: cover;
}
  1. How to apply states to links.
main h1 a:hover{
    color:var(--Yellow);
}

main h1 a:focus{
    color:var(--Yellow);
}

Continued development

I intend to continue studying how to position elements using a combination of CSS Grid and Flexbox.

Perhaps it would have been easier to position the elements by splitting the grid into rows rather than columns.

About

This repository contains my solution to the Frontend Mentor Blog Preview Card challenge. The project was developed using HTML and CSS, focusing on responsive layout techniques with CSS Grid and Flexbox.

Topics

Resources

Stars

Watchers

Forks