Newsletter validation and DOM manipulation with JavaScript

Solution retrospective
I learned to always go with the mobile-first workflow
Make my code responsive with rem
for font-size
instead of px
Make use of rem
for min-width
in media query instead of px
or max-width
Wasn't able to get my mobile view displaying fully at first, because I built desktop view first and used px
for my font-sizes, so a lot of things weren't working as they were supposed to, until I asked for help in Discord and got the best help from Alex, thanks to him now I understand better and will be going back to change my past challenges to mobile-first workflow and always pay attention to building responsive sites.
Will appreciate any views at all in whichever aspect I can make my code better and make better decisions going forward.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @LuisJimenez19
Hello!
Congratulations on successfully completing the challenge.
- If you want to center the content you could modify the '<main>' although in this simple example you could save yourself a container and use the '<body>' you can use the following rules:
element.style { width: 100vw; height: 100vh; overflow: hidden; display: grid; place-content: center; }
This is for devices with a width of more than 768px.
It's great that you've left comments and that you use mobile first.
I hope I've helped you, if you have any questions let me know.
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