Jump to content
Go to solution Solved by tuanphan,

Recommended Posts

Posted

Hi There, I added a dot to the active nav item and when transferred to the mobile menu, the spacing gets messed up. Attached is a picture of what it looks like. Here is the code I am currently using:

/* nav active */
//desktop dot on active
.header-nav-item--active a:after {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: #ED1C24;
    text-align: center;
    margin: 0 auto;
    border-radius: 75%;
}
//mobile dot on active
.header-menu-nav-item--active {
    content: "";
    display: block;
    width: 15px;
    height: 15px;
    background-color: #ED1C24;
    border-radius: 75%;
  text-align: right;
    margin: 0 auto;
}
//desktop color on active
.header-nav-item--active>a, .header-nav-folder-item--active>a, .header-menu-nav-item--active>a .header-menu-nav-item--active {
background-image: none !important;
color: #ED1C24 !important;
}
//mobile color on active
div.container.header-menu-nav-item--active div {
	color: #ED1C24 !important;
  background-image: none !important;
}
/* nav active */

How can I fix this? Thanks in advanced!

Website: https://vibraphone-rhombus-nh9r.squarespace.com/config/settings/website/site-availability

Password: forum

 

Screenshot 2024-02-17 at 10.22.38 PM.png

  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution
Posted

Add this CSS code under your code to fix problem on mobile

.header-menu-nav-item--active {
    width: auto !important;
    background: unset !important;
}

.header-menu-nav-item--active div:before {
    content: "";
    background-color: red;
    width: 15px;
    height: 15px;
    display: inline-block;
    border-radius: 50%;
}

 

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!)

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.