Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

HTML5, CSS3(flexbox and media queries)

@aasthaanand123

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I was not able to create the effect of the box moving whenever the text is shown so I just added a simple hover effect on that. If anyone can help with this I would be grateful. Thank you.

Community feedback

P
Grace 27,950

@grace-snow

Posted

Hi

I'm afraid this needs a lot more work.

I recommend you pause and come back to this later after doing some simpler UI challenges. In particular, I recommend reading up on:

  • Accessible/Inclusive collapsible sections (inclusive components by Heydon Pickering is a good read on this). This is inaccessible to keyboard and assistive tech users at the moment because of the HTML you've chosen before anything else
  • Alternatively the disclosure summary element would be a good inclusive way for you to do this functionality without javascript
  • If wanting to use js for this, you need to use interactive elements and look up how to do simple class toggle on a queryselectorAll e.g. using a foreach instead (this could all be done in about 2 lines of js rather than what you have at the moment)
  • why min- and max- width and heights (probably in rem) would be better for responsiveness than explicit values in percentages. Open devtools on the side and resize your browser a lot to see what's happening
  • Why font sizes should never be in pixels, always rem/em
  • What alt text is, why it matters and how to write it.

Really, there seems loads to address on this. But they are all super common issues that everyone faces. That's why I 100% think you should not try to fix this right now, but take a step back and do more newbie-level HTML and CSS only challenges before returning to refactor this one.

Once you've gone through those simpler challenges you will be much better placed for this one.

All the best

0

@aasthaanand123

Posted

@grace-snow Thank you for the feedback. This was really informative and I did not know many things I could have done like using disclosure summary element. I'll try to incorporate this and will keep in mind your suggestion of coming back to this after doing some simpler challenges Thanks!

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord