Highlighting text in CSS (Flex theme)

Solved

Highlighting text in CSS (Flex theme)

MaxCosta
Shopify Partner
265 2 59

Hi everyone,

I'm trying to highlight a text, to make a background appear behind my text, like here :

MaxCosta_1-1725606902752.png

The text I want to apply this to is the text at the bottom left of my slider (the first section of my home page https://akrofragrances.com/).

MaxCosta_2-1725606970065.png

Je souhaite appliquer un fond de couleur blanc (sur ce texte noir)

 

I tried this code snippet in my CSS:

a {
text-color: black;
background-color: white;
}

However, the background-color is applied to my entire section and everything becomes white.

 

Does anyone have an idea for this please?

Thanks in advance!

Accepted Solution (1)

GTLOfficial
Shopify Partner
489 99 95

This is an accepted solution.

HEllo @MaxCosta 

Go to online store ----> themes ----> actions ----> edit code ----> assets ----> styles.css
add this code at the end of the file.

#shopify-section-image_6q4q98 .slideshow-classic__preheading {
background-color: #e9ee00;
width: fit-content;
line-height: 1 !important;
padding: 0 !important;
}

result
20.png

If this was helpful, hit the like button and accept the 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

View solution in original post

Replies 3 (3)

Tech_Coding
Shopify Partner
186 51 51

Hello @MaxCosta 

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>
  .slideshow-classic__preheading.pretext p a {
      background: #fff;
      padding: 5px;
   }
</style>

Tech_Coding_0-1725607398874.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
2105 749 951

Hi @MaxCosta

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:

<style>
.slideshow-classic__preheading.pretext a {
    text-shadow: 2px 2px 5px rgba(255, 255, 0, 0.7);
    font-weight: bold;
}
</style>

 

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 😍

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

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

GTLOfficial
Shopify Partner
489 99 95

This is an accepted solution.

HEllo @MaxCosta 

Go to online store ----> themes ----> actions ----> edit code ----> assets ----> styles.css
add this code at the end of the file.

#shopify-section-image_6q4q98 .slideshow-classic__preheading {
background-color: #e9ee00;
width: fit-content;
line-height: 1 !important;
padding: 0 !important;
}

result
20.png

If this was helpful, hit the like button and accept the 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