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

Newsletter sign up form

@NkululekoCyrilCele

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


I found it difficult to figure out why the illustrations don't show when I deploy on GitHub. Also, figuring out the true margins and padding was not easy. That made the project not exactly the same as the previews given.

Community feedback

@yefreescoding

Posted

👋eyy. I'd like to help you with your question. After taking a look to your solution there's a couple of things you can do to show the illustration.

  • Adding a background-color and a background-image will make your styles collide, what can be causing problems to your container:
.container {
    // ❌ you should delete this property
    background-color: var(--white);
    background-image: url(/assets/images/illustration-sign-up-mobile.svg);
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 auto;
    max-width: 50rem;
    padding: 1.5625rem
}
  • Your component does not have a container for your image:
  <main>
      <section class="container">
        <article class="signup-form">
          <h1>Stay updated!</h1>
          <p>Join 60,000+ product managers receiving monthly updates on:</p>
          <ul>
            <li><img src="./assets/images/icon-list.svg" alt="icon list">
              Product discovery and
              building what matters</li>
            <li><img src="./assets/images/icon-list.svg" alt="icon list">
              Measuring to ensure
              updates are a success</li>
            <li><img src="./assets/images/icon-list.svg" alt="icon list"> And
              much more!</li>
          </ul>
          <form action="success.html" id="newsletterForm" class="form">
            <label for="email">Email address</label>
            <input type="email" id="email" name="email"
              placeholder="[email protected]">
            <button type="submit" class="btn">Subscribe to monthly newsletter</button>
          </form>
        </article>
      </section>
    </main>

See, you did a great job using semantic html tags which makes me figured out the problem very quickly. You should create a container to store the image inside of it:

  <main>
      <section class="container">
        <article class="signup-form">
         // The rest of your code and the form goes in here
        </article>
         // Creates a container for your image
        <div class="image_container">
          <img src="./path/your-image.jpg" alt="your image"/>
        </div>
      </section>
    </main>

This way you can separate your component and make it easy for you to styled.

I hope this can help you fix your solution. Keep it up! you're doing a great job!

Marked as helpful

0

@NkululekoCyrilCele

Posted

@yefreescoding

Thank you for your assistance. I will definitely try this.

0

@NkululekoCyrilCele

Posted

@yefreescoding Thank you so much! It worked. I'm just gonna work on breakpoints now.

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