franvandee Posted September 4, 2021 Share Posted September 4, 2021 (edited) Site URL: https://www.pinkmoonb.com/shop Because I have 2 different Instagram Links, they need to be distinguished from each other. I would like text to come up when I hover over the Instagram Icon. Edited September 11, 2021 by franvandee spelling mistake Link to comment
franvandee Posted September 5, 2021 Author Share Posted September 5, 2021 It is live now, please try again. Link to comment
tuanphan Posted September 8, 2021 Share Posted September 8, 2021 Hi, You want Hover Instagram >> Show text (like as tooltip)? 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
franvandee Posted September 11, 2021 Author Share Posted September 11, 2021 yes, that is correct Link to comment
tuanphan Posted September 12, 2021 Share Posted September 12, 2021 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; } paul2009 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
paul2009 Posted September 12, 2021 Share Posted September 12, 2021 @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. /* 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"; } DV2 1 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
franvandee Posted September 13, 2021 Author Share Posted September 13, 2021 Thank you guys so much for your smart and apt answers. I am just not sure why i am not getting the desired result ? I go tp the home page, Settings, Advanced, and I paste the Custom CSS. But when I preview the page, there is no difference? Am I doing something incorrect? Link to comment
paul2009 Posted September 13, 2021 Share Posted September 13, 2021 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. tuanphan 1 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
franvandee Posted September 13, 2021 Author Share Posted September 13, 2021 You guys are the best!!!!! Thank you so much! Sorted! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment