Skip to content

shangum/FAQ-Accordion-Card-Challenge-Frontend-Mentor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - FAQ accordion card solution

This is a solution to the FAQ accordion 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:

  • View the optimal layout for the component depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Hide/Show the answer to a question when the question is clicked

Screenshot

Desktop Screenshot

Links

My process

Built with

  • HTML
  • CSS
  • Sass
  • Flexbox
  • Mobile-first workflow
  • JavaScript
  • jQuery - JS library

What I learned

  1. How to use css to rotate images: Initially I was looking for the "up arrow" icon in the challenges resource (I'm use to icon packs like font awesome so I was spoiled). I eventually found out that I would have to figure out how to flip the provided image based on the accordion state. During this challenge I discovered the "transform" css rule which I used to rotate the the icon. Very cool trick which I will definitely use in the future.

  2. How to have images extend beyond their parent element: It was good getting familiar with this design style. I've never worked on a design like this and it was good practice handling overflows and working with negative margins.

  3. Positioning background images of elements: It was a bit tricky figuring out how to get the background image to line up with the main images above. During this project I became more familiar with the background-position css rule.

  4. Sass: I have been continuing to become more familiar with adding Sass to my workflow. Using Sass has been helping me in my journey to use responsive units mainly in my projects.

Continued development

In the future I want to continue to use Sass and explore more of the advanced functionality.

Useful resources

Author

About

FAQ accordion card challenge hub for Frontend Mentor IO

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published