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

JackB91 150

@JackB91

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What challenges did you encounter, and how did you overcome them?

I am having some issues styling the background image to only take up the top part of the viewport.

What specific areas of your project would you like help with?

Why when I click on the plus image it no longer gets the desired images from the correct source and instead displays the alt text?

Community feedback

@LeviKuhaulua

Posted

Howzit, for the background, you can make use of the following:

body {
background: url(path/to/background-image/), [background-color]; 
background-size: 100%; 
background-repeat: no-repeat; 
}

This will ensure that the background starts with the background image then transition to the background-color.

For the images, it might be due to the img tags having the same id attribute. To have it so that the images change when you click on them, each img will need to have a unique id, then you would need to add an event listener for each img element and handle the logic for when users click on them.

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