Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

How to make buttons the same size/width in tablet view


pixies1

Question

Site URL: https://typeAprofessionals.com

Hi all,

I have two large side-by-side buttons at the bottom of my home page, with a spacer on each side to make them more centered on the page. The buttons are the same width as each other and look fine in desktop and mobile view.

However, in tablet view, the "order form" button is slightly narrower than the "file upload" button and it looks bad that they're not the same width. I believe button width in tablet view is being determined by their text labels, and "file upload" is one character longer than "order form."

If I remove one letter from the "file upload" button, then they're the same width in tablet view. But obviously I want to keep the labels as is. I also noticed that if I remove the spacers, then they're the same width in tablet view, but I don't want to do this either because I like them more centered.

I've searched the forum on this but haven't found a solution. If anyone can come up with one using CSS, it would be much appreciated! Thanks in advance!

Edited by pixies1
typo
Link to comment

4 answers to this question

Recommended Posts

  • 0
On 4/11/2021 at 4:04 AM, pixies1 said:

Site URL: https://typeAprofessionals.com

Hi all,

I have two large side-by-side buttons at the bottom of my home page, with a spacer on each side to make them more centered on the page. The buttons are the same width as each other and look fine in desktop and mobile view.

However, in tablet view, the "order form" button is slightly narrower than the "file upload" button and it looks bad that they're not the same width. I believe button width in tablet view is being determined by their text labels, and "file upload" is one character longer than "order form."

If I remove one letter from the "file upload" button, then they're the same width in tablet view. But obviously I want to keep the labels as is. I also noticed that if I remove the spacers, then they're the same width in tablet view, but I don't want to do this either because I like them more centered.

I've searched the forum on this but haven't found a solution. If anyone can come up with one using CSS, it would be much appreciated! Thanks in advance!

try

@media only screen and (min-width: 600px) and (max-width: 992px) {
  #get-started .sqs-block-button-element {
    width: 90px;
  }
}

image.thumb.png.96c80d2a6028617347f31deeb4aa9122.png

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0

Hi bangank36, thank you! The buttons are now the same size, thanks to your code. I adjusted the width to add a little spacing between the buttons and I added a left margin to get them centered correctly on the page:

margin-left: -5px;
width: 75px;

However, now the words "FILE UPLOAD" are not centered in the second button. Any idea how to correct this? Maybe I should have centered the buttons a different way than adding "margin-left"?

Screen Shot 2021-04-13 at 9.52.00 AM.png

Link to comment
  • 0
18 hours ago, pixies1 said:

Hi bangank36, thank you! The buttons are now the same size, thanks to your code. I adjusted the width to add a little spacing between the buttons and I added a left margin to get them centered correctly on the page:

margin-left: -5px;
width: 75px;

However, now the words "FILE UPLOAD" are not centered in the second button. Any idea how to correct this? Maybe I should have centered the buttons a different way than adding "margin-left"?

Screen Shot 2021-04-13 at 9.52.00 AM.png

Hi. It looks fine here. Did you solve the probleM?

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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...