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
  • Views 2.7k
  • Created
  • Last Reply

Top Posters In This Topic

A piece at a time.

This should take care of centering the mobile menus.

.Mobile-overlay-nav-item {

  text-align: center;


Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 2 years later...

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.