Jump to content

Keeping button aligned in text box on different screen sizes

Recommended Posts

Posted

Hello

Looking for the code to align a button within a text box at different screen sizes.

So the button will always be a certain number of pixels below the last line of text and the text box will always end a certain number of pixels below the bottom of the button.

On some screen widths there is too much of a gap between the text and the button and on others, the button is ending up over the text.

Thanks

screencapture-thegoodliferefresh-squarespace-2023-06-30-12_29_54.png

  • Replies 8
  • Views 704
  • Created
  • Last Reply

Top Posters In This Topic

Posted (edited)

Thanks, I've managed to turn the link into a button - using this code:

a#book_call_btn {
  display: inline-block;
  padding: 20px 40px;
  background-color: #dfa695;
  color: #ffffff;
  cursor: pointer;
  text-align: center;
  font-size: 18px;
  transition-duration: 0.4s;
}

So I just need help with the code to keep the 'button' aligned in the text box.

Edited by Bexster
Posted (edited)

I am using the button link on desktop and text link on mobile only section as desktop looks fine. Should I change both?

Really appreciate your help with this!

Edited by Bexster

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.