Jump to content

Mobile Menu 2nd Button not in folders

Recommended Posts

Hi,

I realized an issue with my client's website design where I wanted to keep the "2nd button" styling for the "ORDER" button on the main mobile mnu page, but not wanting the nth-child rule to apply to folders. Is there a code that can help me keep that from happening (ie. I don't want any other nav item to look like a button except "Order" and "Get in Touch")

1418557641_ScreenShot2022-11-08at11_59_21AM.thumb.png.62d7d4db126fc3a96c116d7916a14755.png146366422_ScreenShot2022-11-08at11_59_28AM.thumb.png.aa387cf9ce394b7eda2817c4008a7678.png

Link to comment

Can you share the website URL, page, and password (if applicable)? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

You could try and exclude the folder items with this after the CSS selector 
:not(.header-menu-nav-folder-content)

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

What CSS have you got added? Can you share it here (just the relevant lines)?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 
Hire me on Upwork!

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

 Did I help? Buy me a coffee?

Link to comment

For example this code

@media screen and (max-width: 767px) {
    .header-menu-nav-item:nth-child(5) a {
        background:#e8ca6c !important;
        color: #a62544 !important;
        width: 200px;
        border-radius: 10px;
        text-align: center !important;
        margin: auto !important;
        font-family: 'augusto';
        font-weight: 100;
        padding-bottom: 25px !important;
        padding-top: 30px !important;
        margin-top: 35px !important;
        padding-left: 30px;
        padding-right: 25px;
        font-size: 26pt
    }

    .header-menu-nav-item:nth-child(5) a:hover {
        background-image: none;
        border-radius: 10px;
        background-color: #fff !important
    }
}

change it to

@media screen and (max-width: 767px) {
    .header-menu-nav-folder[data-folder="root"]>div>div:nth-child(5)>a {
        background:#e8ca6c !important;
        color: #a62544 !important;
        width: 200px;
        border-radius: 10px;
        text-align: center !important;
        margin: auto !important;
        font-family: 'augusto';
        font-weight: 100;
        padding-bottom: 25px !important;
        padding-top: 30px !important;
        margin-top: 35px !important;
        padding-left: 30px;
        padding-right: 25px;
        font-size: 26pt
    }

    .header-menu-nav-folder[data-folder="root"]>div>div:nth-child(5)>a:hover {
        background-image: none;
        border-radius: 10px;
        background-color: #fff !important
    }
}

 

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

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.