Design comparison
Solution retrospective
Hello, everyone! So, this is my first project to be done with a JavaScript, and I'm particularly excited about it. However, I did come across a few things I wasn't so sure about how to tackle:
-
How was the icon button made to fit in properly into the input, and also, the error icon? Mine overlapped my icon button at first. I kinda cheated to get it to work, and yet, it isn't perfect.
-
I used JavaScript to switch the layout between the image and the text using this code: function screenSize() { if (window.matchMedia("(max-width: 1099px)").matches) { const colText = document.querySelector('.col-1-text'); const col2 = document.querySelector('.col-2');
colText.before(col2); } }
It sure worked, but it isn't perfect. When resizing the screen, it wouldn't take effect, not until the browser is refreshed. Is there a way to get it to work without having to refresh the browser?
Thank you.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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