Jump to content

How to left-align homepage headers just on mobile

Recommended Posts

Posted (edited)

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

Password to site is "password"

On the homepage on mobile, I want the "Testimonials" header and subtext and "Featured case study" header and subtext to be left-aligned. I also want to left align the "View the case study" button on mobile. I want them to stay centered on desktop.

How can I do this? When I change the alignment from center to left in the mobile view, it also changes the desktop view.

Edited by Craig456
  • Replies 3
  • Views 355
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted
17 hours ago, Craig456 said:

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

Password to site is "password"

On the homepage on mobile, I want the "Testimonials" header and subtext and "Featured case study" header and subtext to be left-aligned. I also want to left align the "View the case study" button on mobile. I want them to stay centered on desktop.

How can I do this? When I change the alignment from center to left in the mobile view, it also changes the desktop view.

Try the following code to make tt

@media only screen and (max-width: 767px) {
  #block-yui_3_17_2_1_1660667937194_236600  h2, #block-yui_3_17_2_1_1660667937194_310862 p {
    text-align: left !important;
  }
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Pinch/Zoom images, videos - PDFs Lightbox - ...) </>  🗓️ Delivery Date Picker (Date picker form field)
Gallery block 7.1 workaround </> 🤖 Ask me anything

Posted

This left-aligned the Testimonials headers but none of the other text I mentioned. I want the "Testimonials" header and subtext and "Featured case study" header and subtext to be left-aligned. I also want to left align the "View the case study" button on mobile. I want them to stay centered on desktop.

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.