Responsive Signup form using HTML, CSS & JavaScript
Design comparison
Solution retrospective
Hello everyone,
This is my solution to the Intro component with Signup form challenge. I changed the the background color and button text color to fix the contrast issue so it not going to look like the design files. All feedback is welcome and greatly appreciated.
Thanks,
Rebecca
Community feedback
- @adonmez04Posted 10 months ago
Hi @bccpadge, that's a good solution. Keep coding. I haven't solved this challenge yet, but I can give you some quick tips:
- You don't need to use the
width
property for yourform
class. This breaks the responsive behavior of HTML, use themax-width
ormax-inline-size
property instead. In fact, it's better not to use thewidth
andheight
properties in CSS with explicit values (thewidth
property can be used with the percentage size unit, it behaves the same as block-level elements). - You can add the
max-width
property to yourform__headline
class to avoid making your button the full width of the page. - You can use the
flexbox
for the components and you can use thegrid
for an entire layout, but it's a good project to get some practice with thegrid
property.
I hope these will help you. Keep coding and have a nice day...
Marked as helpful0@bccpadgePosted 10 months ago@adonmez04
Thank you for the feedback. Can you elaborate on which components would use
flexbox
in this project? I am not a fan of implementingflexbox
when you have to add more code to the stylesheet.0@adonmez04Posted 10 months ago@bccpadge You can use the
display: flex;
declaration for this project because it will be part of the main page and there will probably be other elements in the page. Thedisplay:grid;
declaration could be for a more general element, like acontainer
orbody
etc.For your
main
class, you can set theflex-flow: column wrap;
, if you start themobile-first
design, and at some breakpoint, you switch to theflex-flow: row wrap;
for the desktop version. Basically, you can apply this ruleset to yourmain
class instead ofgrid
:display: flex; flex-flow: column wrap; max-inline-size: 30rem; margin-inline: auto;
You also don't need the
grid
property on yourbody
element, it will have the same behavior with thismargin-inline: auto;
declaration. Using these tools sharply, you won't need too much code in your stylesheets.I highly recommend reading the Flexbox and Grid sections of this resource: https://web.dev/learn/css
Marked as helpful0 - You don't need to use the
- @NikNTPosted 10 months ago
Nice work, Rebecca! Your solution looks unique!
1
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