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

Base Apparel Landing Page using HTML, CSS & JavaScript

Melissa 80

@melissafdavis

Desktop design screenshot for the Base Apparel coming soon page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Having a couple of issues I'd love some help with.

  1. The error message that is dynamically created when user enters an invalid email address or no email address shows up then disappears immediately, even more so on Github Pages than when run on local server.

  2. On my local server, the mobile version looks good. When I pull it up from GitHub pages on my local machine, the mobile version looks good as well. However, when I pull up the Github pages link on my phone the site looks weird.

Thanks for any help at all!

Community feedback

Melissa 80

@melissafdavis

Posted

Thank you for your help! The preventDefault() took care of the issue. And I see what I did wrong with the max-width now. Looking at my work, I designed desktop first and then added stylings for mobile. I wish I'd done mobile first like almost everyone says you should. I think I needed this experience to prove to me why that's important though. Grateful for the learning opportunities that these challenges provide!

0

P
Matt Studdert 13,611

@mattstuddert

Posted

@melissafdavis no problem! Yeah, working mobile-first is a great workflow. I'd definitely recommend giving it a go. I'm glad you're finding the challenges useful!

0
P
Matt Studdert 13,611

@mattstuddert

Posted

Hey Melissa, great work on this challenge! Here are some answers to your questions:

  1. When the form is submitted the browser refreshes by default. That means you lose the state with the error message. To prevent this from happening you can add event.preventDefault() in the validateEntry function. This will stop the browser from refreshing, thereby keeping the validation message.
  2. What size is the screen on your mobile? You've currently got a max-width: 375px media query for the mobile styles. This means that anyone with a mobile or tablet screen of greater than 375px will see very squashed content. So I'm guessing your mobile phone has a screen size larger than 375px.

I hope that helps. Keep up the great work!

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