Jump to content

How can I center this text just on mobile?

Go to solution Solved by Ziggy,

Recommended Posts

Posted (edited)

Site URL: https://www.craigkleila.com/

Password is "password".

On my homepage on mobile, I want to center the subtext under my H1 - "Grow your organic traffic and revenue with highly personalized SEO strategies that produce first-page results." 

However, I want to keep it left-aligned on desktop. How can I do this?

Edited by Craig456
  • Replies 2
  • Views 254
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution
Posted

 You need to use a media query in the Custom CSS to target mobile (using screen max-width), and then target the text block with the block ID, and then set the text alignment to center:

@media screen and (max-width:749px) {
  #block-yui_3_17_2_1_1660700494123_911821 {
    text-align:center !important;
  }
}

Let me know if that works for you!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

📈 SEO Space (Referral link)
Ⓜ️ 
Will Myers' Plugins & Tutorials (Referral link)
 🔌 Ghost Squarespace Plugins (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️Pinch-to-Zoom Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.