Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search

Hide section in desktop


Recommended Posts

Hi,

I have 2 sections on a page. Top is for desktop, bottom is for mobile. I successfully hid the top section in mobile view thanks to code found here. I now need to hide the bottom section in desktop view.

This is the code that I used to hide for mobile

/* this code for tablet - mobile */

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

  [data-section-id="5f168cff92f0a40baa399208"]{

    display: none;

  }

}

Now trying to hide this section on desktop

<article class="sections" data-page-sections="5f168bd06a769b073e0558ae" id="sections">

Thanks, I appreciate your help.

Link to post
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Add to Home > design > Custom CSS

/* Hide this on Mobile */
@media screen and (max-width:767px) {
	[data-section-id="enter-id-here"] {
		display: none;
	}
}
/* Hide this on Tablet - Desktop */
@media screen and (min-width:768px) {
	[data-section-id="enter-id2-here"] {
		display: none;
	}
}

Find data section id with this tool. https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff?hl=en

You can send your question to my email to get detail answer. / How to Setup Password & Share URL 

-- Pour your heart into it

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...