Jump to content

Custom CSS not working for mobile view

Recommended Posts

Hi! I am using custom CSS to have buttons width occupy 100% of the screen on mobile view, and also for the page logo in header to change on specific pages. For some reason nothing is working. This is the code:

/* Header logo */
@media only screen and (max-width:767px) {
  body#collection-636997b0d30783082de18988.page-faqs .header-title-logo a {
    content: url('https://static1.squarespace.com/static/62adaf0603d8e10682bd2f64/t/65d5c00bc018f861344f6478/1708507147165/Logo_TGO-07.png') !important;
    max-width: 200px;
  }
}

 

/* Button width */
@media only screen and (max-width: 767px) {
    .list-item-content__button.sqs-block-button-element.sqs-block-button-element--medium.sqs-button-element--primary {
        width: 100%;
    }
}

 

 

Any help appreciated!

Link to comment
  • 2 weeks later...

Use this code for mobile

@media screen and (max-width:767px) {
body#collection-636997b0d30783082de18988 header#header img {
    content: url(https://static1.squarespace.com/static/62adaf0603d8e10682bd2f64/t/65d5c00bc018f861344f6478/1708507147165/Logo_TGO-07.png);
}
}

image.png.b9585b78e260aec352fc6e4b559684ed.png

With button

Which page are you referring to? I don't see button on FAQs page

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
  • 2 weeks later...

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.