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

My solution for Newsletter signup form

JhonFXA 120

@JhonFXA

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'm encountering a small issue with the responsiveness. I was testing the site using a mobile resolution on my computer, and the results looked fine. However, when i access the site on a real mobile screen, it appears distorted. It's a bit hard to describe, but the layout appears broken. I plan to test it on other smartphones.

Community feedback

Carl 815

@CarlHumm

Posted

Hi there

It looks like the distortion and extra space is coming from an element with a class of .success-message, which is positioned off-page using transform: translateX(800px).

The solution would be to control the overflow by setting the position to relative and the overflow property to hidden for the parent container of the overflowing content, in this case that's main.

So just do something like this.

main {
position: relative;
overflow:hidden
}

I see you tried to set overflow-x:hidden to the body. You may be thinking, why can't I just do the same as above for the body, like this:

body {
position:relative;
overflow-x:hidden;
}

This will not work. Whilst I'm not exactly sure on the details I believe it pertains to something called Overflow Viewport Propagation

To get this to work you would need to set the root HTML elements overflow property to anything but visible and then assign an overflow property to the body - however this is highly discouraged as it disables scrollbars and impacts accessibility

Good luck

Marked as helpful

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