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

'Advice generator' app via HTML & CSS & JavaScript/TypeScript

Valery 90

@Koptelkin

Desktop design screenshot for the Advice generator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Welcoming any feedback I have one unresolved moment - I need to replace divider.svg when layout changes from dekstop to mobile and back. How should i do it?

Community feedback

Bryan Li 3,550

@Zy8712

Posted

To answer your question, one way you can implement the divider.svg so that it changes for different screen sizes is using the <picture> tag. Here is what I did for mine:

<picture>
  <source media="(max-width:420px)" srcset="./images/pattern-divider-mobile.svg">
   <img src="./images/pattern-divider-desktop.svg" alt="divider_img">
</picture>

What this does is that it uses the image inside the <img> tag by default, unless the screen size is less than 420px. You can do something similar to that.

Hope I was able to help 👍

1

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