Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 11 months ago

Newsletter Sign In

FabFalch•130
@FabFalch
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Very proud to say that I didn't need too much time to complete this challenge and I didn't find it too challenging!

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

Challenges I Faced

Although this project had it's challenges it was a project that i felt very confident in. After completing this project i felt pride in knowing my skills are growing and i'm ready to take on another challenge. With this said, here's a few challenges i faced and overcame.

Mobile Responsiveness

The design specs included two success state designs: one for desktop and one for mobile. Initially, I approached this by creating separate designs for both states and toggling them using display: none and display: block. However, this resulted in messy and unmanageable code, and the buttons linked in JavaScript weren’t functional in the mobile view due to this setup.

Realizing the issue, I simplified my approach by using a single success design for both views and leveraging @media queries to style them appropriately for mobile and desktop. This streamlined solution worked perfectly, and although I kicked myself for not doing it sooner, I’m glad I learned from this mistake.

Selecting the email value in Javascript

In the mobile success state, the confirmation message displays the user’s email in bold text. While creating the email value was straightforward, styling it without affecting the entire <p> tag proved tricky.

To solve this, I created a <span> element in JavaScript, added a class to it for styling, and added it into the message using ${email.value} to pull in the user's email. This allowed me to style the email specifically without impacting the rest of the text.

Example code in JavaScript: <span class='highlight-email'>${email.value}</span>

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

When it comes to the specific areas where I needed help, I realized it wasn’t the project itself that posed the biggest challenge but rather the planning and decision-making process. Figuring out what to prioritize and how to approach the project as a whole was where I needed the most guidance. I'm looking forward to working with other people on bigger projects!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on FabFalch's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License