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

Ping coming soon page solution

#sass/scss

@Lfrancos

Desktop design screenshot for the Ping single column coming soon page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hello everyone!! Hope everyone is having a lot of fun with the challenges : )

I'm not sure what is the best way to do things for this kind of form validation. I've been doing it by adding a class and removing it. But this time I did all the changes of the styles directly form JavaScript. Not sure what is the best practice, if any of you has an idea or an article that talks about that I would really appreciate it : )

Thank you so much!!

Community feedback

Shahin NJ 1,190

@SJ-Nosrat

Posted

Hi Lorenzo, Great job, love the responsiveness of the page. I think your approach by controlling your CSS with JavaScript is quite fine. You don't need to create an entire <div> and styled to only have JavaScript removing and add it back in. The whole point of using JS is to dynamically change specific items on a page.

Also, there's this new concept of CSS-in-JS which I came across, however, it has to deal with the React framework.

I also noticed that your icons at the bottom of the page are not there. Furthermore, for your <main> container tag: instead of adding width: 95%; and max-width: 640px;, you can do the following;

   .main {
      margin: 0 auto;
      text-align: center;
      width: min(640px, 95%);
}

width: min(640px, 95%); will take the minimum value of the two values relative to the viewport size.

Hope the above helps!

Best of luck on your journey! Wonderful work!

Marked as helpful

0

@Lfrancos

Posted

@SJ-Nosrat Thank you soo much for the notes here. I really appreciate you taking the time to point all this things : ) I didn't know about this "width: min()" I will definitely give it a try and see how it works : ) Thanks!

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