Jump to content

Center align all text and buttons on mobile only

Recommended Posts

Site URL: https://halibut-asparagus-lxxs.squarespace.com/

This seems like it should be simple but the code I tried didn't work so I'm coming here! I would like all text on mobile only to be centered aligned, as well as any buttons.

Here is the code I tried for the text:

@media screen and (max-width: 640px) 
h1, h2, h3, p, { 
   text-align: center !important;
}

Any help would be super appreciated!

Link to comment
  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...
On 10/25/2020 at 6:50 PM, knoble07 said:

Found this solution! Still would like all images and buttons to also align...

 

// all text
@media only screen and (max-width: 480px) {
p, H1, H2, H3 { text-align: center; }}

Is there a way to do this on a specific page only? For text and buttons?

Link to comment
On 3/20/2023 at 10:53 PM, johnpaulstuthridge said:

Is there a way to do this on a specific page only? For text and buttons?

If you share link to that page, we can help easier

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

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.