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

newslettersignupwithsuccessmessage

@Blackwidow8

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


Hello, my fellow developers. i need some help with my code. As I was finishing up with the success message, I had trouble arranging the contents in my second container. Whenever I use display: flex, the second container appears where the main-grid is.

I have used the hidden method to hide the success message. Does anybody have a solution? I will very much appreciate. Thank you in advance.

Community feedback

@freaky4wrld

Posted

Hey there buddy, here's what you can do.........

  • first of all be clear in mind that you will work only with the main-grid component, there's no need of a second-grid, use the below code to center your main-grid
.main-grid{
        width: [value]%
        margin: [value]rem/em auto;

that will do the work to center the component....

  • secondly use the same-classes and that you used to position your main-grid component, like the text-classes as it would help you to reduce the redundancy.....

  • now create a hide class to hide the signup-form on button-click, the hide class should be like the below code....

.hide{
    display: none;
}
  • use the event-listener to toggle between the hide class to show up the thank you message...

This would be the start to adding modifications to your project, I would suggest you to learn the DOM Manipulation, watch these tutorials and try to resolve your issue

I hope that would be great to start in the right direction for modifications....... glad if I can be of any use to you....... do let me know what happened after you alter your code!!

Marked as helpful

0

@Blackwidow8

Posted

aww thank you!@freaky4wrld

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