Jump to content

Hover box background on text

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://oriole-panda-2fhm.squarespace.com/

Hi, 

I am trying to have a hover box effect in my mega menu that is similar to the effect of the regular navigation section. The mega menu is pulling a regular section, so the items are not ''navigation items'' but regular text box items.

I have gotten part of the effect using the code below, but I would like the background box to be a bit wider top to bottom around the lettering WITHOUT it displacing the text top-bottom.

The links from the text should be clickable anywhere on the background box. 

site url: https://oriole-panda-2fhm.squarespace.com/

PW: dialogue

CODE:

.sqsrte-small:hover{
  a {
    color: white !important;
    padding-left: .5em;
    padding-top: 0;
    padding-bottom: 0;
      }
    }
.sqsrte-small:hover {
  background: #112742 !important;
}
 

any help is appreciated 🙂

Andrew

Link to comment
  • Replies 3
  • Views 513
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

6 hours ago, AndrewDurand said:

Site URL: https://oriole-panda-2fhm.squarespace.com/

Hi, 

I am trying to have a hover box effect in my mega menu that is similar to the effect of the regular navigation section. The mega menu is pulling a regular section, so the items are not ''navigation items'' but regular text box items.

I have gotten part of the effect using the code below, but I would like the background box to be a bit wider top to bottom around the lettering WITHOUT it displacing the text top-bottom.

The links from the text should be clickable anywhere on the background box. 

site url: https://oriole-panda-2fhm.squarespace.com/

PW: dialogue

CODE:

.sqsrte-small:hover{
  a {
    color: white !important;
    padding-left: .5em;
    padding-top: 0;
    padding-bottom: 0;
      }
    }
.sqsrte-small:hover {
  background: #112742 !important;
}
 

any help is appreciated 🙂

Andrew

Do you mean increasing this space for each item?

image.thumb.png.8c7653a8a9990e03ebdfde135e7f61b6.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
  • Solution
14 hours ago, AndrewDurand said:

yes, I would like the dark background to be increased, but not displace the text around it.

Is that possible?

Thanks.

 

Try adding to Design > Custom CSS

.wm-mega-menu-item p {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px !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.