Shopify themes, liquid, logos, and UX
Hi,
I would like to add this question mark to my product pages, when the user hovers over the question mark I would like to add a message.
Solved! Go to the solution
This is an accepted solution.
Hello @monica22
Greetings!!
Add this code where you put the question mark on product pages
<span class="ques_tooltip hide_msg_toggle">
<span style="left: 0;" class="ques_tooltiptext">
Enable the button to show delivery messages applicable to specific rules only and hide the general/default message for all other products.
</span>
</span>
<style type="text/css">
.ques_tooltip {
position: relative;
display: inline-block;
cursor: pointer;
}
.hide_msg_toggle:after {
content: '?';
display: block;
line-height: 20px;
width: 20px;
font-size: 12px;
text-align: center;
font-weight: 700;
color: #fff;
vertical-align: middle;
top: 0;
position: relative;
background: #3c8060;
border-radius: 20px;
}
.ques_tooltip .ques_tooltiptext {
visibility: hidden;
width: 320px;
font-weight: 400;
background-color: #161515e0;
color: #fff;
line-height: 1.4;
text-align: center;
border-radius: 6px;
padding: 10px;
position: absolute;
z-index: 1;
bottom: 165%;
left: 40%;
margin-left: -60px;
border: 1px solid #ddd;
box-shadow: 0 0 1px #43467f;
}
.ques_tooltip:hover .ques_tooltiptext {
visibility: visible;
z-index: 9999999999999;
}
.ques_tooltip .ques_tooltiptext::after {
content: "";
position: absolute;
left: 60px;
bottom: -18px;
margin-left: -9px;
margin: 0 0 0;
border-width: 9px;
border-style: solid;
border-color: #161515e0 transparent transparent transparent;
}
</style>
Output
This is an accepted solution.
Hello @monica22
Greetings!!
Add this code where you put the question mark on product pages
<span class="ques_tooltip hide_msg_toggle">
<span style="left: 0;" class="ques_tooltiptext">
Enable the button to show delivery messages applicable to specific rules only and hide the general/default message for all other products.
</span>
</span>
<style type="text/css">
.ques_tooltip {
position: relative;
display: inline-block;
cursor: pointer;
}
.hide_msg_toggle:after {
content: '?';
display: block;
line-height: 20px;
width: 20px;
font-size: 12px;
text-align: center;
font-weight: 700;
color: #fff;
vertical-align: middle;
top: 0;
position: relative;
background: #3c8060;
border-radius: 20px;
}
.ques_tooltip .ques_tooltiptext {
visibility: hidden;
width: 320px;
font-weight: 400;
background-color: #161515e0;
color: #fff;
line-height: 1.4;
text-align: center;
border-radius: 6px;
padding: 10px;
position: absolute;
z-index: 1;
bottom: 165%;
left: 40%;
margin-left: -60px;
border: 1px solid #ddd;
box-shadow: 0 0 1px #43467f;
}
.ques_tooltip:hover .ques_tooltiptext {
visibility: visible;
z-index: 9999999999999;
}
.ques_tooltip .ques_tooltiptext::after {
content: "";
position: absolute;
left: 60px;
bottom: -18px;
margin-left: -9px;
margin: 0 0 0;
border-width: 9px;
border-style: solid;
border-color: #161515e0 transparent transparent transparent;
}
</style>
Output
Thank you so much!!! I really appreciate your help, it worked like a charm.
Hi
Where do you paste this code exactly?
Thanks
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025