css button link help!

Solved

css button link help!

emilyaugstudios
Pathfinder
122 1 58

Hi everyone, I have added the code below to my website to add a red underline ease-in on hover for link buttons (you can see this feature work on all links within the site), and I love it! However, on the product page just for the pop out 'THE SIZE GUIDE' button/link the line doesn't sit right, instead appearing underneath the link line (images added below). 

 

If anyone has any help on what I might be doing wrong or advise on how to target this specific link that would be greatly appreciated! 

 

URL – https://pantee.co.uk/?_ab=0&_fd=0&_sc=1&preview_theme_id=144118972631

 

.small-feature-link {
position: relative;
}

.small-feature-link::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 1px;
background-color: #c90013;
transition: width 0.5s linear;
}

.small-feature-link:hover::after {
width: 100%;
}

 

What it's doing –

Screenshot 2024-09-12 at 15.05.22.png

 

What it should look like –

Screenshot 2024-09-12 at 15.05.29.png

 

Accepted Solution (1)

BSSCommerce-HDL
Shopify Partner
2298 847 1061

This is an accepted solution.

Hi @emilyaugstudios

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag

.js-product.product-info .small-feature-link::after {
    bottom: 5px !important;
}

 Here is result: 
Before hover: 

BSSCommerceHDL_0-1726150642781.png


After hover: 

BSSCommerceHDL_1-1726150654347.png

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you  😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

View solution in original post

Replies 3 (3)

Tech_Coding
Shopify Partner
301 76 67

Hello @emilyaugstudios 

You can add code by following these steps

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.liquid file

3. Paste the below code before </body> on theme.liquid
<style>
  .small-feature-link {
    text-decoration: unset !important;
  }
</style>

Tech_Coding_0-1726150465196.png

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.

my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Shopify UI Developer
Your Coffee Tips adds a little sweetness to my day.

BSSCommerce-HDL
Shopify Partner
2298 847 1061

This is an accepted solution.

Hi @emilyaugstudios

Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code

Step 2: Search file theme.liquid

Step 3: Insert this code above </head> tag

.js-product.product-info .small-feature-link::after {
    bottom: 5px !important;
}

 Here is result: 
Before hover: 

BSSCommerceHDL_0-1726150642781.png


After hover: 

BSSCommerceHDL_1-1726150654347.png

Hope this can help you,

If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you  😍

Sale banner, pop ups: Customize your sale banner, pop-ups and create countdown bar to boost conversion rate.
Simicart: Transform your Shopify store into a stunning and fully functional mobile app with just a few simple steps.
Product Labels & Badges:
Get more sales with striking labels, badges, and banners from our 10,000+ available templates.

BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now

BSS-TekLabs
Shopify Partner
2350 701 826

- Here is the solution for you @emilyaugstudios 
- Please follow these steps:

z5686811214059_e66de1953f1db631f9134af5cdb796ad.jpg

- Then find the theme.liquid file.
- Then add the following code at the before tag </head> and press 'Save' to save it.

<style>
.small-feature-link::after {
    bottom: 3px !important;
}
</style>

- Here is the result you will achieve:

BSSTekLabs_0-1726151515430.png

 

- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.

If our suggestions are useful, please let us know by giving it a like or marking it as a solution.


Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)


Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page


BSS Commerce - Full-service eCommerce Agency | Use Shopify for 1$ in the first month now