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

Semantic HTML5 markup, CSS3, Flexbox, SASS, VanillaJS

@Babajide777

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Good day all,

This is my first time using SASS, so I'll appreciate any comment on the file structure and how to make it better. Regards.

Community feedback

LEUILLIER• 120

@JulienLEUILLIER

Posted

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

1
Marcus Hugo• 365

@marcus-hugo

Posted

I had the same problem when switching to desktop. What worked for me was placing the desktop illustration and bg-pattern as background-images.

background-image: url(../images/illustration-woman-online-desktop.svg), url(../images/bg-pattern-desktop.svg);
background-position:  -76px, -571px -248px;
background-size: 472px, 966px;
background-repeat: no-repeat;

Hope this helps!

Marked as helpful

0

@Babajide777

Posted

@JulienLEUILLIER Thanks it is working fine now. Regards.

0

@Babajide777

Posted

@MirthOsas it still doesn't work with the quotation marks.

0

@MirthOsas

Posted

Hey buddy, the quotation mark is missing. The syntax for the background image should be something like this: background-image: url("...........");

0

@Babajide777

Posted

@marcus-hugo

Thanks for your time. I really appreciate it. However, the background is still not showing. I updated my code on Github and the live website. Please check it here: https://github.com/Babajide777/faq-accordion-card

https://babajide-faq-accordion-card.netlify.app/

Regards.

0

@Babajide777

Posted

@marcus-hugo Thanks for the advice Marcos, but I used this method, and for some reason, the background image doesn't show up. Please what do you think might be wrong? This is the code:

.accordion-svg {
    background-image: url(../images/illustration-woman-online-desktop.svg),
      url(../images/bg-pattern-desktop.svg);
    background-position: -76px, -571px;
    background-size: 472px, 966px;
    background-repeat: no-repeat;
  }
0

Marcus Hugo• 365

@marcus-hugo

Posted

@Babajide777

It may have something to do with the url path? You could try

.accordion-svg {
    background-image: url(/images/illustration-woman-online-desktop.svg),
    url(/images/bg-pattern-desktop.svg);
    background-position: -76px, -571px;
    background-size: 472px, 966px;
    background-repeat: no-repeat;
  }

or

.accordion-svg {
    background-image: url(images/illustration-woman-online-desktop.svg),
      url(images/bg-pattern-desktop.svg);
    background-position: -76px, -571px;
    background-size: 472px, 966px;
    background-repeat: no-repeat;
  }

Marked as helpful

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