Jump to content

Code block for mobile only

Recommended Posts

I created a vertical line to use as a divider on a website I am building. The only way I could do it was with custom css and html. However it doesn't work for the mobile version of the website. Is there a way to hide this block of code for the mobile site? Thanks in advance. I can provide my source code if that helps. 

Link to comment
  • Replies 1
  • Views 1.2k
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi, can't check without a link to your website or more details, but try the below. This will not show the selected element. You will need to replace with your block selector.

@media only screen and (max-width:640px) {
	your_line_block_reference {
		display: none!important;


-------- > 👆 <---------- Please quote or @ me when replying, or I won't get a notification 

Melody | Squarespace Website Developer
e: melody@melodylee.tech

💻 💁‍♀️ 1-2-1 Squarespace Training session <- feeling stuck and want to learn?
👩‍💻 💁‍♀️ Customisation help <- send me your design
 Did I help? I like 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.