Jump to content

Header Instagram Icon Hover Text

Recommended Posts

19 hours ago, franvandee said:

yes, that is correct

Add to Design > Custom CSS

/* Hover instagram - First icon */
a.icon.icon--fill[href*="pink_moon_beauty"] {
    position: relative;
}
a.icon.icon--fill[href*="pink_moon_beauty"]:after {
    content: "This is instagram 1";
    display: block;
    position: absolute;
    width: 150px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    top: -30px;
    z-index: 9999;
    background-color: rgba(0,0,0,0.5);
    padding: 5px;
    border-radius: 5px;
    opacity: 0;
}
a.icon.icon--fill[href*="pink_moon_beauty"]:hover:after {
    opacity: 1;
}

 

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

@tuanphan has provided a neat solution above, to add a label to one of the icons. To do this for both icons, you'd need to duplicate the code, changing the label names and URLs for each icon.

However, duplicating code isn't good practice -  a fundamental software engineering principle is 'DRY' or "Don't Repeat Yourself" - so here is a slightly modified version of the previous answer. This styles the labels once and then adds the individual labels for the two icons below.

1363835015_igiconlabels.gif.cfb534e8b5ed15b3b285dd85f53dd04e.gif

 

/* Label on hover over social icons */
a.icon.icon--fill:after {
    color: #fff;
    background-color: rgba(0,0,0,0.5);
    text-align: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
    z-index: 9999;
    background-color: rgba(0,0,0,0.5);
    padding: 4px 7px;
    border-radius: 5px;
    opacity: 0;
}
a.icon.icon--fill:hover:after {
    opacity: 1;
}
/* Label for Beauty icon */
a.icon.icon--fill[href$="/pink_moon_beauty__/"]:after {
    content: "Beauty";
}
/* Label for Boutique icon */
a.icon.icon--fill[href$="/pink_moonboutique/"]:after {
    content: "Boutique";
}

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
4 minutes ago, franvandee said:

I go to the home page, Settings, Advanced, and I paste the Custom CSS.
But when I preview the page, there is no difference?

Custom CSS goes in Design > Custom CSS, not in the Advanced Page Settings or Code Injection areas.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

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.