[JCD] FAQ accordion card using only HTML & CSS
Design comparison
Solution retrospective
Please let me know if there is something wrong or if we can do it in a better way 😀
Community feedback
- @ApplePieGiraffePosted almost 4 years ago
Hey, jonathancierp_dev! 👋
Nice work on this challenge! Your solution looks good, is responsive, and the accordion card works well! 👏
I only suggest closing the FAQ that is open by default when another FAQ is opened (currently, that tab is unable to be closed) for a little consistency in the design. 😉
Keep coding (and happy coding, too)! 😁
1@JonathanCierpPosted almost 4 years agoHi, @ApplePieGiraffe
Thanks for replying. I did that because i wanted it show same as demo. I didn't know how to active it on page load without JS if you have some tips :)
0@ApplePieGiraffePosted almost 4 years ago@JonathanCierp
Hmm... if I understand your CSS correctly, you are using the focused states of the FAQs to determine whether or not to display the answer to a FAQ—so I'm afraid I don't know how to focus on a specific element by default when the page loads without JS, either (with
input
elements you can use theautofocus
attribute, but I don't know if there's something like that fordiv
s). 😅 If you were to use radio buttons to make the accordion card (a popular method of solving this challenge), you could simply add the attributechecked
, but... alright, then! 😄1@JonathanCierpPosted almost 4 years ago@ApplePieGiraffe
Alright,
autofocus
don't work on div. I prefer to not replace thediv
bycheckbox
to just solve this challenge :pThanks for advices.
1@ApplePieGiraffePosted almost 4 years ago@JonathanCierp
NP! I actually never thought of solving this challenge the way you did—so learned something new! 😊
Happy coding! 😁
1 - @MasterDev333Posted almost 4 years ago
Great work! Please remove overflow-y: scroll for HTML tag. You used BEM and I love it. Look forward to seeing other solutions from you. Happy coding~ :)
1@JonathanCierpPosted almost 4 years ago[EDITTED] Thanks you ^^ didn't saw the scrolling bar !
0
Please log in to post a comment
Log in with GitHubJoin 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