Accordion by HTML details tag(HTML, CSS ONLY)

Solution retrospective
Why can't apply display: flex
to details
tag? I wanted to put a gap between summary
and p
tags, but flexbox didn't work, so I gave a margin-top
to the p
tag.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@giovanigomez1
Hello, it seems like you did not use Html tags that is why you cannot use display: flex, you can use <div class="details"><div/> instead of <details><details/> then select the class .details with css and you will be able to use display flex.
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