Jump to content

Prevent Site Title (and subtitle) Stacking on Mobile Screen

Recommended Posts

Hi,

Site: https://www.boutique14.co.uk

How do I prevent the site title from stacking on mobile please?

On desktop it looks like this:

image.png.93cf5b371875e4139219a9dddd61cc7c.png

But when it goes to media screen / mobile view the site title  and subtitle stack like this:

image.png.bd86579f7ef5d74dc785348c9c9c2e5c.png

I have tried using a mobile-only logo which is merely a jpg screen grab of the site title from desktop view, and that looks ok (ish), but ideally I'd like to find a way to keep using a site title in text rather than a mobile logo.

Is there someway it can dynamically scale the font size so it always stays on one line?

 

NB I'm also using this CSS to create the subtitle "bespoke wedding stationery"

//Inserts subtitle 2nd line to site title and styles it//
a#site-title:after {
    content: "bespoke wedding stationery";
    display: block;
      font-size: 1.3rem;
      font-family: 'Garamond';
      letter-spacing: 3px;
      line-height: 1.3rem;
}

Obviously I want to retain the subtitle and prevent that from stacking too.

 

Thank you!

 

Tom  

Link to comment

@TomKnowsNoCSS I would do this with some media queries at different breakpoints, most likely just 640px and under. Change your CSS to this and adjust those font sizes below. You can copy and paste the media query and change the size to something else 767px 500px 320px etc.

 

a#site-title {
  &:after {
    content: "bespoke wedding stationery";
    display: block;
    font-size: 1.3rem;
    font-family: 'Garamond';
    letter-spacing: 3px;
    line-height: 1.3rem;
  }

  //change these font sizes or add different pixel widths as needed
  @media only screen and (max-width: 640px) {
    font-size: 20px !important;
    &:after {
      font-size: 1rem;
    }

  }
}

 

  Did I help you? Buy me a coffee!

👨‍💻 Bergen Design Co.

💻  I'm for hire on Upwork!

🕸️ Squarespace Experts  

🖥️ 99Designs

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.