Submitted 7 months ago
sign-up newsletter page with HTMl, CSS and JS native
@ImMarcio
Design comparison
SolutionDesign
Solution retrospective
What are you most proud of, and what would you do differently next time?
I like build this site more fast, but i learned much
What challenges did you encounter, and how did you overcome them?Somethings not adjust and i broken my mind for adjust they
What specific areas of your project would you like help with?somethings in javascript
Community feedback
- @AnwarMestycerPosted 7 months ago
Hi, Márcio, you are on the right path; well done!
- Try to use
rem
instead ofpx
to give your element more flexibility on different screens. - Use media queries in CSS to match mobile screens and change the image on desktop and mobile screens.
style.css
@media screen and (max-width:600px ){ .card-main { height: 100%; flex-direction: column-reverse; }}
main.js
const image=document.getElementByClassName("img-card") function imageAdjust (){ if (window.matchMedia("(max-width: 900px)").matches) { image.src="/assets/images/illustration-sign-up-mobile.svg" } else{ image.src="/assets/images/illustration-sign-up-desktop.svg" } } window.onload = imageAdjust; window.onresize = imageAdjust;
This is just the beginning of your awesome journey as a front-end developer Keep up the good work.
Hope this was helpful and if you need any help don't hesitate to contact me here.
Marked as helpful0@ImMarcioPosted 7 months ago@AnwarMestycer Thanks for tips, i'll do this in the nexts challenges
0 - Try to use
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