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

Faq Accordion page with bootstrap and js

@dominic298

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Alex 3,130

@Alex-Archer-I

Posted

Hi!

Good work, congrats =)

Here are a few tips.

It's better not to set height explicitly for the container. In real project the content could be change time to time, and you'll have to override it. So, it's more convenient to make its height responsive. The same thing about the body - use min-height instead of height.

The box-shadow property have a very wide browser support now, so you can omit vendor prefixes =)

You can reach every attribute of every tag with JS. That way you can change src of the image in your function. It'll allow you to get rid of extra img tag and a few css rules =)

const img = document.querySelector('img')
img.src = "newImage.jpg";

So, hope this helps, good luck =)

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