Jump to content

Trying to hide text on mobile only - what am I doing wrong?

Go to solution Solved by Ziggy,

Recommended Posts

@tuanphan I'm trying to remove this paragraph on mobile only so it condenses for an easier read on this page. I tried looking through the forum to create CSS to display: none but seem to be typing in the wrong sections because it doesn't hide anything. 

What am I doing wrong? Probably selecting the wrong thing...

/* hide text on mobile page */

@media screen and (max-width:767px) {

div#block-yui_3_17_2_1_1692044036679_453 {

    display: none;

}

}

website: https://cymbals-tan-fkf5.squarespace.com/  (liposuction page)
PW: halpme

Screenshot 2023-08-14 at 4.34.04 PM.png

Link to comment

Your block ID isn't correct. Try this:

@media only screen and (max-width:767px) {
  #block-7f6f84971868ce4169d2 {
    display: none;
  }
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • Solution

Just resize and move the blank text box up then shrink the section size.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

No, it looks like you have the right code, try refreshing your page, usually helps.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment
  • 5 weeks later...
On 9/19/2023 at 6:38 AM, nicki-patsios said:

Each block will have a different block id, you can use this tool to find ID and use similar code on other pages

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

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

@tuanphan @Ziggy

I swear I'm not trying to be a problem child. 🫠

Website: https://www.drjohnhsu.com/malechest

I used this code and nothing is happening. Here is a screenshot of me inspecting and everything. What am I doing wrong? It shows <div class="fe-block fe-block-c4f07081e4e9ccd85c39">


@media only screen and (max-width:767px) {

  #block-c4f07081e4e9ccd85c39 {

    display: none;

  }

}

Screenshot 2023-09-23 at 10.05.33 AM.png

Link to comment

Can you paste all of your Custom CSS here? I can't tell from the screenshot but you may have an extra } after?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

@Ziggy here the chaos 😆

.sqs-block-accordion .accordion-item__title {
    line-height: 1.8em !important;
}
/* Homepage header transparent */
body.homepage header#header {
    background-color: transparent !important;
}
/* Mobile - Homepage - Top video */
@media screen and (max-width:767px) {
[data-section-id="64d535c47131067e93d2956b"] .html-block {
    visibility: hidden !important;
}
}
@media only screen and (max-width: 767px) {
    footer p {
        text-align: center !important;
    }
    #block-3e2c8e6d315584c880a2 .social-icon-alignment-left .sqs-svg-icon--list {
        text-align: center !important;
    }
}
@media only screen and (max-width:767px) {
  #block-7f6f84971868ce4169d2 {
    display: none;
  }
}
/* Mobile - Homepage - Top video */
@media screen and (max-width:767px) {
[data-section-id="64d535c47131067e93d2956b"] .html-block {
    visibility: hidden !important;
}
[data-section-id="64d535c47131067e93d2956b"] video {
    position: absolute !important;
    object-position: 80% !important;
}
  
  @media only screen and (max-width:767px) {
  #block-c4f07081e4e9ccd85c39 {
    display: none;
  }
}
}
/* Mobile gallery image order */
@media screen and (max-width:767px) {
[data-section-id="64dbe3100225b33a0e282cc2"] {
figure.gallery-grid-item:nth-child(3) {
    position: relative;
    left: 100%;
}
figure.gallery-grid-item:nth-child(4) {
    position: relative;
    right: 100%;
}
  }
}
/* Hide logo when burger menu is open - all pages */
body.header--menu-open header#header img {
    visibility: hidden;
}

Link to comment

It looks like there were a few brackets in the wrong place, can you try this replacement:

.sqs-block-accordion .accordion-item__title {
    line-height: 1.8em !important;
}
/* Homepage header transparent */
body.homepage header#header {
    background-color: transparent !important;
}
/* Mobile - Homepage - Top video */
@media screen and (max-width:767px) {
  [data-section-id="64d535c47131067e93d2956b"] .html-block {
    visibility: hidden !important;
  }
}
@media only screen and (max-width: 767px) {
  footer p {
      text-align: center !important;
  }
  #block-3e2c8e6d315584c880a2 .social-icon-alignment-left .sqs-svg-icon--list {
      text-align: center !important;
  }
}
@media only screen and (max-width:767px) {
  #block-7f6f84971868ce4169d2 {
    display: none;
  }
}
/* Mobile - Homepage - Top video */
@media screen and (max-width:767px) {
  [data-section-id="64d535c47131067e93d2956b"] .html-block {
    visibility: hidden !important;
  }
  [data-section-id="64d535c47131067e93d2956b"] video {
    position: absolute !important;
    object-position: 80% !important;
  }
}  
@media only screen and (max-width:767px) {
  #block-c4f07081e4e9ccd85c39 {
    display: none;
  }
}
/* Mobile gallery image order */
@media screen and (max-width:767px) {
  [data-section-id="64dbe3100225b33a0e282cc2"] {
    figure.gallery-grid-item:nth-child(3) {
      position: relative;
      left: 100%;
    }
    figure.gallery-grid-item:nth-child(4) {
      position: relative;
      right: 100%;
    }
  }
}
/* Hide logo when burger menu is open - all pages */
body.header--menu-open header#header img {
    visibility: hidden;
}

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 
 🖼️ Gallery Lightbox Plugin (Referral link) 

 Did I help? Buy me a coffee?

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.