pixies1 Posted April 10, 2021 Share Posted April 10, 2021 (edited) 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 April 10, 2021 by pixies1 typo Beyondspace 1 Link to comment
Beyondspace Posted April 13, 2021 Share Posted April 13, 2021 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; } } pixies1 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
pixies1 Posted April 13, 2021 Author Share Posted April 13, 2021 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"? Link to comment
tuanphan Posted April 14, 2021 Share Posted April 14, 2021 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"? 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. Or send to forum message 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
pixies1 Posted April 14, 2021 Author Share Posted April 14, 2021 The buttons are now the same sizes, yes, but now the "File Upload" text is not centered on the button. Any idea how to fix? Maybe I should have adjusted the margin a different way? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment