Jump to content

Code for mobile - reduce text size

Go to solution Solved by iamdavehart,

Recommended Posts

Site URL: https://sunflower-accordion-z2d3.squarespace.com/

My site is 7.0 - https://sunflower-accordion-z2d3.squarespace.com/

I have the below css targeting the card elements on the homepage:

// HOMEPAGE //
#introduction {.image-title p {
  color: white !important;
  font-size: 50px !important;}
}

// IMAGE CARD ON LIGHT BANNER //
#professional-link {.image-title p {color: black !important;
  font-size: 50px !important;}
.image-subtitle p, .image-subtitle p a {color: black !important;}
}
 

This forces the titles "HOMEOWNER" and "PROFESSIONAL" to be larger on the homepage. 

However, on mobile these titles are breaking onto two lines so I need to make them smaller for mobile and I can't seem to target them correctly...

Thanks in advance!

IMG_1274.PNG

IMG_1275.PNG

Link to comment
  • Replies 2
  • Views 537
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

  • Solution

put your desired css inside a media query that only kicks in up to 768px (iPad width - this is the size squarespace kick their mobile styles in).

e.g. something like this. 

@media screen and (max-width: 768px) {
  #introduction {.image-title p {
    font-size: 25px !important;}
  }
}

add this in addition to your existing rules of course.

 

Dave Hart. Software/Technology Consultant living in London. buymeacoffee 

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.