Jump to content

Is There A Way To Make This CSS Mobile Friendly?

Go to solution Solved by tuanphan,

Recommended Posts

Is there. a way to use make this code mobile friendly with CSS?

As in, make the folder title a link to another page and then have another page under it for a dropdown menu.


div.header-nav-folder-content {
	margin-top: -1.5rem;}


.header-nav-folder-item:first-of-type a {
	opacity: 0;}

Here is my website


Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

17 hours ago, tuanphan said:

Mobile friendly - What do you mean?

As in, is there a way to make the folder header covered by a link and then have  a page underneath, much like the web version of my website with CSS?

Link to comment
  • Solution

You can add this code to Website Tools (under Not Linked) > Code Injection > Footer (DO NOT add to Custom CSS)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
  $(document).ready(function() { 
		$('a[data-folder-id="/surface-design"]').click(function() {
  .header-menu-nav-folder[data-folder="/surface-design"] {
    display: block !important;
    position: relative !important;
    transform: unset !important;
    overflow: hidden;
    height: auto !important;
    transition: all 0.3s;
.header-menu-nav-folder[data-folder="/surface-design"] .header-menu-controls {
    display: none;
a.tp-burger-folder+.header-menu-nav-folder[data-folder="/surface-design"] {
    height: 100% !important;
.header-menu-nav-folder[data-folder="root"] {
    transform: unset !important;
    overflow: hidden;
[data-folder="/surface-design"] a {
    margin-top: 5px;
    margin-bottom: 5px;
    white-space: nowrap;
[data-folder-id] {
    margin-top: 10px;
    margin-bottom: 10px !important;
  a[data-folder-id] span:nth-child(2):after {
    content: "\e009";
    font-family: 'squarespace-ui-font';

a[data-folder-id] {
    white-space: nowrap;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.