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 Signup Form with Success Message

aslinsjr 630

@aslinsjr

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


Just build with HTML, CSS e Vanilla Js

Community feedback

Bryan Li 3,550

@Zy8712

Posted

Your site looks pretty good and functions as expected. If you want to center your boxes what you can do is add the following code:

body{
   width: 100vw;
   height: 100vh;
}

main{
   width: 100%;
   height: 100%;
   display: flex;
   flex-direction: column;
   justify-content: center;
   align-items: center;
}

The code above makes sure your body and main take up the entire viewport, and then it centers the box using the attributes display, flex-direction, justify-content, and align-items.

Additionally if you want to keep your attribution out of the way so it doesn't mess with the box centering, you can add something like:

footer{
   position: absolute;
   bottom: 8px;
}

Besides that your solution is very solid. Nice work 👍

Marked as helpful

0

aslinsjr 630

@aslinsjr

Posted

Thanks bro, i'll improve that! @Zy8712

0

@MaximilianoDanielGarcia

Posted

Hi @aslinsjr, good job!

If you're wondering how to center it just add this:

body {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

footer {
    position: absolute;
    bottom: 30px;
}

Marked as helpful

0

aslinsjr 630

@aslinsjr

Posted

Thanks bro, i'll improve that! @MaximilianoDanielGarcia

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