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

Interactive card details form

Barney 370

@waikoo

Desktop design screenshot for the Interactive card details form coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


  1. Could I please get some help with making the cards responsive across viewports, rather than setting fixed media queries as I attempted and still failed?

  2. This is my best looking JavaScript ever, I tried a bunch of things within this form validation, any tips regarding the structure, modules, type of functions used in modules, control flow-related comments are much appreciated as well!

Rant: The thing I had most trouble with were the 2 cards and their offset. I couldn't make it responsive even after asking help in the slack channel. I had a blueprint with grid and flexbox, but somewhere along following it I got lost and nothing would work.

I spent several (excited) days trying out very beginner-like non-DRY code to refactoring the JavaScript to its current form, but CSS seems to get increasingly more frustrating as the scattered dots called JS terms begin to connect in my head.

Community feedback

Alan 160

@TheMax370

Posted

Hi Barney congrats on completing the challenge and to answer your questions:

  1. You will always need media queries for displaying your web page on smaller devices, why? because as much as responsive your web page is some elements or containers will need some kind of resizing, if you want to make cards responsive across viewports then you should use vh and vw lengths. You can check my last challenge and see the approach that I took on responsive containers and images.

2.In the case of your JS is alright and the approach you took works, there are two things that I saw that you should check first one is that the function that autofills the inputs should be deleted because users should be able to input and see their own information rather than deleting some existing one, second your cardholder name should have a max length and your card number input doesn't let me delete the card number.

But in general your web page is really responsive and that is something good.

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