How to move badge at corner and change size

Solved

How to move badge at corner and change size

Avalonz
Tourist
14 0 1

I want to move the badge at the corner like a shown in the image through red box. 

But i can still move through theme settings  because in future i may change position from top right to somewhere else.

And also i want to change size.

Store: theavalonz.in

1000039627.jpg

Accepted Solution (1)
GTLOfficial
Shopify Partner
726 154 155

This is an accepted solution.

Hello @Avalonz 
use this CSS in your  "component-card.css" file and save it

.card__badge.top.right {
    position: relative;
    right: -10px;
    top: -12px;
}


Please let me know
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh

View solution in original post

Replies 13 (13)

niraj_patel
Shopify Partner
2378 514 508

Hello @Avalonz 
Can you share store URL?

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com
Avalonz
Tourist
14 0 1

theavalonz.in

GTLOfficial
Shopify Partner
726 154 155

Hello @Avalonz 
please kindly share your website link so I can check and give you a solution.

Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
Avalonz
Tourist
14 0 1

theavalonz.in

GTLOfficial
Shopify Partner
726 154 155

This is an accepted solution.

Hello @Avalonz 
use this CSS in your  "component-card.css" file and save it

.card__badge.top.right {
    position: relative;
    right: -10px;
    top: -12px;
}


Please let me know
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
Avalonz
Tourist
14 0 1

It worked thanks 😍

But when i want to do like this for top left i should change the word right and write their left?

GTLOfficial
Shopify Partner
726 154 155

for the left side use this css

.card__badge.top.left {
    position: relative;
    top: -13px;
    left: -10px;
}


Please let me know
Thanks 

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
Avalonz
Tourist
14 0 1

Ok thank you so much 😊 

And how can i change font size?

GTLOfficial
Shopify Partner
726 154 155

For that go to the "base.css" file and find this CSS in line number "2883"

 

.badge {
    border: 1px solid transparent;
    border-radius: var(--badge-corner-radius);
    display: inline-block;
    font-size: 1.2rem;
    letter-spacing: 0.1rem;
    line-height: 1;
    padding: 0.5rem 1.3rem 0.6rem 1.3rem;
    text-align: center;
    background-color: rgb(var(--color-badge-background));
    border-color: rgba(var(--color-badge-border), var(--alpha-badge-border));
    color: rgb(var(--color-badge-foreground));
    word-break: break-word;
}

 

 and replace the " font size 1.2rem" to 1.3rem or 1.4rem according to your requirement.
you can also give it in pixel e.g- 15px

Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh
Avalonz
Tourist
14 0 1

Thank you so much 😊

GTLOfficial
Shopify Partner
726 154 155

always there to help you.
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh

Rahul_dhiman
Shopify Partner
702 139 146

Hello @Avalonz  Please share the link of your website.

Was I helpful?

Buy me a coffee


Want to modify or custom changes or bug fix on store . Or Need help with your store? Or -Want Complete Storefront
Email me -rahul@prowebcoder.com - Skype: live:dhiman.639

Checkout Apps by me

GTLOfficial
Shopify Partner
726 154 155

Hello @Avalonz 
use this CSS in your  "component-card.css" file

.card__badge.top.right {
    position: relative;
    right: -10px;
    top: -12px;
}

  
Please let me know
Thanks

- Buy me a Pizza
- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on the store Hire me. GTL web solutions
- Want Complete Storefront: Send an email ⇨- Email: info@gtlofficial.com - Skype: ritesh_27dh