Latest solutions
Latest comments
- @Babajide777@JulienLEUILLIER
Your code works, you just need to add height to
.accordion-svg
. By default backgrounds take the height of their container if I'm not mistaken, and if you use your browser Dev-tools you'll see the container has no height. Hope that helps !Marked as helpful - @jma26@JulienLEUILLIER
Hi Jesse ! I did this challenge a few days ago, nice work on this one. I'm not an expert by any means but I've got some feedback on this one :
- You should make it so the arrow is a background to the button, thus making it clickable to expand the question.
- For the expanding animations, I used this approach. But I like your use of
height: auto
withvisibility
. - I don't think a fixed height is really an issue, I used a dynamic height but it's really preference I guess ? With animations on the expansion the height changes are more smooth.
Great job !
Marked as helpful - @Al-Baraa-Bakri@JulienLEUILLIER
Good work !
I would allow users to click on the whole
.line
element to see the answer. I think you're also missing the mobile background image on mobile layout! Keep up the good work!Marked as helpful - @nntt1210@JulienLEUILLIER
Really nice solution, with responsiveness on the mobile layout !
You can use
classList.toggle
to actually add and remove the.active
class in your script, to save a few lines.Keep up the good job !
Marked as helpful