Base Apparel coming soon page(BOOTSTRAP)
Design comparison
Solution retrospective
any suggestions will be appreciated😊 There is a problem with my submit button! whenever I click on the submit button , it goes down... I have no idea 😥
Community feedback
- @unachozaPosted about 1 year ago
regarding your submit button issue:
you have
div class="invalid-feedback">
between the<input/>
and the<button>
elements. This is fine because it is set todisplay:none
whilst no error is present, completely removing it from the DOM Tree, making it seem as though there is nothing between<input/>
and<button>
. When the form does detect an error, yourdiv class="invalid-feedback">
becomesdisplay: block
which adds the element into the DOM creating the space between the elements.if you want to hold space for the element (so elements don't move upon rerender), you can use the
visibility
property, set to;visibility: hidden
. then change tovisibility: visible
. read more https://www.freecodecamp.org/news/css-display-none-and-visibility-hidden-the-difference/suggestion to fix your code move the
div class="invalid-feedback">
beneath<button>
element. This should stop your button from jumping down if there is an error.0
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