Skip to content

hattami98/faq-accordion-card-main

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 Mobile

Links

My process

In this challenge, I started as usual by measuring the layout, then coded the HTML script, and followed by doing the CSS styling. I started programming the JS script as soon as I finished my mobile styling. After done with Javascript, I continued to desktop styling.

Built with

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

What I learned

In this challenge I learned how to create an accordion feature. I also custimized by not only opening and closing one tab, but also closed the tab as I open another one. I also learned how to deal with images.

Useful resources

  • MDN - Box-Shadow - This article helps me understand how to use box-shadow, specifically blur-radius and spread-radius.
  • W3Schools - Gradient - This one article helps me how to make gradient background.

Author