Add line in between products in cards

Solved

Add line in between products in cards

TrendBlend
Trailblazer
287 0 32

Hello, I'm trying to add a horizontal line in between products in my card drawer, so I added this code:

 

{%- unless forloop.last -%}
<tr>
  <td>
    <hr style="border: 1px solid red !important; width: 100%; margin: 10px 0;">
  </td>
</tr>
{%- endunless -%}

 

But it just adds a red . in between the products and not a full line like the default top and bottom horizontal line. Does anyone know how I can show a horizontal line there?

Accepted Solution (1)
websensepro
Shopify Partner
1674 188 224

This is an accepted solution.

@TrendBlend 

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.css / based.css file and paste the code in the bottom of the file.

.cart-drawer .cart-item {
    border-bottom: 1px solid gray !important;
    padding-bottom: 20px !important;
}
.cart-drawer .cart-item:last-child {
    border-bottom: none !important;
}

Result:

websensepro_0-1736170951733.png

websensepro_1-1736170964163.png

 

If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP

View solution in original post

Replies 8 (8)

websensepro
Shopify Partner
1674 188 224

Hi  @TrendBlend , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
websensepro
Shopify Partner
1674 188 224

Hi @TrendBlend 

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.css / based.css file and paste the code in the bottom of the file

.cart-drawer .cart-item {
    border-bottom: 1px solid gray;
    padding-bottom: 22px;
}

Result:

websensepro_0-1736169242834.png

 

If my reply is helpful, kindly click like and mark it as an accepted solution.

If you are happy with my help, you can help me buy a COFFEE

Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP

DaisyVo
Shopify Partner
2261 267 324

Hi  @TrendBlend 

 

Please share your store URL 

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
Moeed
Shopify Partner
6530 1773 2144

Hey @TrendBlend 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find password.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.cart-drawer .cart-item {
    border-bottom: solid 1px black !important;
    padding-bottom: 20px !important;
}
</style>

RESULT:

Moeed_0-1736168523414.png

 

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

 

Best Regards,
Moeed

- Need a Shopify Specialist? Chat on WhatsApp

- Get a quick Shopify quote – Click here!

- Custom Design | Advanced Coding | Store Modifications


websensepro
Shopify Partner
1674 188 224

 

@TrendBlend Give the width in vw instead of %. For example, width:100vw;

websensepro_0-1736168476338.png

If my reply is helpful, kindly click like and mark it as an accepted solution.

If you are happy with my help, you can help me buy a COFFEE

Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP
TrendBlend
Trailblazer
287 0 32

Hello @websensepro , this code makes my card horizontally scrollable which I absolutely do not want.
Hello @Moeed the code you provided also adds a horizontal line under the last cart item which I do not want since there is already a horizontal line under it aswell for the footer.

websensepro
Shopify Partner
1674 188 224

This is an accepted solution.

@TrendBlend 

1. Go to Online Store -> Theme -> Edit code.
2. Open your theme.css / based.css file and paste the code in the bottom of the file.

.cart-drawer .cart-item {
    border-bottom: 1px solid gray !important;
    padding-bottom: 20px !important;
}
.cart-drawer .cart-item:last-child {
    border-bottom: none !important;
}

Result:

websensepro_0-1736170951733.png

websensepro_1-1736170964163.png

 

If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!

Need a Shopify developer? Hire us at WebSensePro For Shopify Design Changes/Coding
For Free Tutorials Subscribe to our youtube
Get More Sales Using Big Bulk Discount APP
Create Your Shopify Store For Just 1$/Month
Get More Sales Using Big Bulk Discount APP