Jump to content

Troubleshooting: Formatting HTML Text in Mobile View

Recommended Posts

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

Hi there, 

 

I added custom HTML to two text sections of my client's site. It looks good on desktop but isn't formatting properly on mobile. The website. url is: https://www.bycourtneytodd.com/

Here's the HTML code I added:

<span style= "font-family:'Gistesy', arial;   background: linear-gradient(180deg, 
    rgb(254, 244, 247) 50%, #FEF4F7 50%); font-size: 100px; font-weight: 60;
  display: inline;
" >Consider me your go-to social media girl</span>

 

Desktop View:

900538740_ScreenShot2021-12-12at7_57_00PM.thumb.png.eeaa101bc4e71b6c095098209d06ec94.png

 

Mobile View:

IMG_2091.thumb.PNG.9bab67f19d2bae2c07fd94a989b2fca8.PNG

 

 

I also added this HTML code in another section:

<span style= "font-family:'QuickThin', arial;   
font-size: 40px !important;
text-alignment: center !important;
color: #443532;
font-weight: 600;
background: linear-gradient(180deg, #FEF4F7 50%, #F2EBE7 50%);
" >Past Hotel Partnerships</span>

 

Desktop View:

134731445_ScreenShot2021-12-12at7_57_13PM.thumb.png.70a6b56d9a26d3ab763c7bee21b6fda4.png

 

Mobile View:

IMG_2092.thumb.PNG.ee845a56485291dd6a40997e892812b7.PNG

 

 

I'll also attach photos of what I see in each view. Any help is appreciated!
 

 

Link to comment
21 minutes ago, thenookcreative said:

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

Hi there, 

 

I added custom HTML to two text sections of my client's site. It looks good on desktop but isn't formatting properly on mobile. The website. url is: https://www.bycourtneytodd.com/

Here's the HTML code I added:

<span style= "font-family:'Gistesy', arial;   background: linear-gradient(180deg, 
    rgb(254, 244, 247) 50%, #FEF4F7 50%); font-size: 100px; font-weight: 60;
  display: inline;
" >Consider me your go-to social media girl</span>

 

Desktop View:

900538740_ScreenShot2021-12-12at7_57_00PM.thumb.png.eeaa101bc4e71b6c095098209d06ec94.png

 

Mobile View:

IMG_2091.thumb.PNG.9bab67f19d2bae2c07fd94a989b2fca8.PNG

 

 

I also added this HTML code in another section:

<span style= "font-family:'QuickThin', arial;   
font-size: 40px !important;
text-alignment: center !important;
color: #443532;
font-weight: 600;
background: linear-gradient(180deg, #FEF4F7 50%, #F2EBE7 50%);
" >Past Hotel Partnerships</span>

 

Desktop View:

134731445_ScreenShot2021-12-12at7_57_13PM.thumb.png.70a6b56d9a26d3ab763c7bee21b6fda4.png

 

Mobile View:

IMG_2092.thumb.PNG.ee845a56485291dd6a40997e892812b7.PNG

 

 

I'll also attach photos of what I see in each view. Any help is appreciated!
 

 

Try adding to Home > Design > Custom Css

@media only screen and (max-width: 767px) {
  #block-yui_3_17_2_1_1639316373669_4464  span {
    display: block !important;
    line-height: 1;
    font-size: 5.5rem !important;
    text-align: center;
  }

  #block-yui_3_17_2_1_1639354339306_8305   span {
    line-height: 1;
  }
}

Let me know how it works on your site

Support me by pressing 👍 if this useful for you

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • 1 month later...
On 1/15/2022 at 8:21 AM, thenookcreative said:

P.S. I adjusted the line height in my code so the lines are no longer overlapping, but I'd like the font size to adjust in the mobile view so it's not so large.

 

IMG_2183.PNG

You mean homepage top banner text? Use this CSS

/* home top banner text mobile */
@media screen and (max-width:640px) {
div#block-yui_3_17_2_1_1642207431838_6072 * {
    font-size: 40px !important;
}
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.