Skip to content

dannxvc/faq-accordion

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

Links

My process

Built with

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

What I learned

<details class="accordion">
        <summary class="question">
          What is the maximum file upload size?
        </summary>
        <div class="answer">
          No more than 2GB. All files in your account must fit your allotted storage space.
        </div>
</details>
#images::after{
    content: url(/assets/img/illustration-woman-online-mobile.svg);
    position: absolute;
    width: 73%;
    max-width: 19rem;
    top: -1rem;
    left: 50%;
    transform: translate(-50%, -50%);
}

Useful resources

  • Developer Mozilla - HTML Elements |
    - This helped me to make an accordion with a semantic meaning and found the right tag elements for me not to neccesarly use javascript to make it work. I really liked this pattern and will use it going forward.

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published