Jump to content

Changing positioning of newsletter field error

Recommended Posts

I have done some custom code on the newsletter email box to surround the submit button with the same border as the field itself using absolute positioning. My issue is that if you click the "Book a Demo" button without entering an email, the error message offsets (moves down) the form email field, but doesn't offset the button. As a result I get strange spacing as shown in the screenshot below.

Any JS ideas on how to stop the error message from offsetting the field? Because the button has an absolute position and the field does not, I assume that is how it would have to be done, I just don't know which code to invoke to do it.

Thanks!

Screen Shot 2022-06-29 at 2.17 (1).png

Screen Shot 2022-06-29 at 2.17.png

Link to comment
  • Replies 5
  • Views 376
  • Created
  • Last Reply

Top Posters In This Topic

  • 4 months later...
On 11/9/2022 at 3:07 PM, PatrickJ said:

Hey @tuanphan! Having this problem on https://mandarin-vanilla-ss4s.squarespace.com as well, password is "brick" - any help would be appreciated!

Try adding to Design > Custom CSS

/* newsletter error */
@media screen and (min-width:992px) {
.newsletter-block .newsletter-form-field-wrapper .field-error {
    position: absolute;
    bottom: 40px;
}
.newsletter-form-footnote {
    padding-top: 40px;
}}

image.thumb.png.4f3da88284135ba4e6009f43326201d2.png

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
13 hours ago, tuanphan said:

Try adding to Design > Custom CSS

/* newsletter error */
@media screen and (min-width:992px) {
.newsletter-block .newsletter-form-field-wrapper .field-error {
    position: absolute;
    bottom: 40px;
}
.newsletter-form-footnote {
    padding-top: 40px;
}}

image.thumb.png.4f3da88284135ba4e6009f43326201d2.png

Thanks @tuanphan! That works, but is there any way to maintain the expanding box functionality while having it placed underneath? Cheers!

Link to comment
  • 2 weeks later...
On 11/13/2022 at 6:25 AM, PatrickJ said:

Thanks @tuanphan! That works, but is there any way to maintain the expanding box functionality while having it placed underneath? Cheers!

What do you mean? Can you explain in more detail?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.