Jump to content

Mobile Nav

Recommended Posts

Posted

Hi,

I am making a mobile navigation for my website to be used on tablet and desktop too. However, the navigation links will not center no matter what I do. if I change them  they change on another thing. Here is my code. Please help 😞

 

.is-mobile-overlay-active .Mobile-overlay {
  @media screen and (min-width: 768px)
  {
    width:30%
}
  @media screen and (max-width: 768px) {
    width:50%
  }
  @media screen and (max-width: 640px) {
    width:80%
  }
}


@media only screen and (max-width: 768px) {
.Mobile-overlay-nav-item, .Mobile-overlay-folder-item {
  text-align: center ;
  margin-left: 65px;
  padding-bottom: 50px} 
.Mobile-overlay-menu {
  width: 100%; z-index: 1}
}

  @media only screen and (max-width: 640px) {
.Mobile-overlay-nav-item, .Mobile-overlay-folder-item {
  text-align: center;
  margin-left: 45px !important;
    padding-top: 0px;
    padding-bottom: 30px} 
.Mobile-overlay-menu {
  width: 100%; z-index: 1;}
}

media only screen and (min-width: 768px)
  {.Mobile-overlay-nav-item, .Mobile-overlay-folder-item {
  text-align: center;
  margin-left: 230 !important;
    padding-top: 0px;
    padding-bottom: 30px} 
.Mobile-overlay-menu {
  width: 100%; z-index: 1;}
}

  • Replies 2
  • Views 1.8k
  • Created
  • Last Reply
  • 1 month later...
Posted

I am using this code to center my navigation, still searching for the solution to center vertically but I added margin which makes the nav show below the header/logo. Maybe this will solve at least part of your issue.

.Mobile-overlay-nav-item, .Mobile-overlay-folder-item { text-align: center; margin-top: 30px !important;;
} 
.Mobile-overlay-menu {width: 100%; z-index: 1;}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.