How to add horizontal line with custom liquid code

Hi, I would like to add a horizontal line below the price on my product page like this:

I tried this:

But the padding is too big. Does anyone know how I can achieve something like on the Bleame website? Thank you for your help.

Best regards,

Store URL: https://inkly.fr/?_ab=0&_fd=0&_sc=1&preview_theme_id=163175923977

Hey @INKLY

Follow these Steps:

  1. Go to Online Store

  2. Edit Code

  3. Find theme.liquid file

  4. Add the following code in the bottom of the file above tag


RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Hi @INKLY ,

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

Step 2: Search file theme.liquid

Step 3: Insert this code above tag:


Here is result:

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 :heart_eyes:

  • Here is the solution for you @INKLY
  • Please follow these steps:

  • Then find the base.css file.
  • Then add the following code at the end of the file and press ‘Save’ to save it.
.price--large {
            border-bottom: solid 1px black !important;
    padding-bottom: 10px !important;
    }
  • Here is the result you will achieve:

  • Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.

Thanks that’s exactly what I wanted. However the text below is a bit too close from the line, do you mind helping me solve that? Thank you!

Hey @INKLY

Keep the previous code and add this new code above in the end of theme.liquid file.

p.product__text.inline-richtext:nth-child(8) {
    padding-top: 20px !important;
}

RESULT:

If I managed to help you then, don’t forget to Like it and Mark it as Solution!

Best Regards,
Moeed

Thank you very much !