Bold a part of my announcement bar

Masaru
Excursionist
42 0 10

Site: betterjoy.co

 

I would like to bold just the "-50% OFF" of the announcement bar on the top.

 

What would be the code to do that. (I should paste it on the theme.scss.liquid  right ?) (I use the theme Brooklyn)

 

 

Thank you!

Replies 10 (10)

Proficient
Shopify Expert
7 0 3

Hey @Masaru if you're using the Debut theme you can follow the steps below:

- Open header.liquid file in the Code Editor

- Search for announcement-bar__message

- Delete the curly braces and everything inside <p class="announcement-bar__message">{{ section.settings.message_text | escape }}</p>

- Replace what you deleted with this: "<strong>-50% OFF</strong> On All Orders"

- Save and you're good to go

By doing this you'll only be able to edit the announcement bar text in the code editor, also anything you place inside of <strong></strong> will become bold

Masaru
Excursionist
42 0 10

I'm on Brooklyn..

 

 

I pasted 

<p class="announcement-bar__message"><strong>-50% OFF</strong> On All Orders</p>

 

but doesn't work...

Not applicable

HTML tag for Bold is <b></b>, try that if not check your CSS files and add a class:

.announcement-bar__message > strong {
  font-weight: bold;
}

 

 

Masaru
Excursionist
42 0 10

Thanks but I would just like to bold the "-50% OFF !"

 

would it be possible ?

Not applicable

Yes first try and replace strong with <b> tags. If you still don’t have the text bold than use the CSS. It will only target what’s in the strong tags. Hope you get it always here if you need more help.

Masaru
Excursionist
42 0 10

I typed 

 

.announcement-bar__message ><b>-50% OFF !</b> {font-weight: bold;}

 

on my theme.scss.liquid

and it didn't work, any suggest ?

Not applicable

What does the HTML look like, still like this?

<p class="announcement-bar__message"><strong>-50% OFF</strong> On All Orders</p>

 

I recommend you first try and replace <strong /> tags with <b /> tags:

<p class="announcement-bar__message"><b>-50% OFF</b> On All Orders</p>

 

If that still does not work add this to your theme.scss.liquid

.announcement-bar__message > b {
  font-weight: bold;
}

 

 

Masaru
Excursionist
42 0 10

where do I need to paste for the second one ?

Masaru
Excursionist
42 0 10

in the theme.scss.liquid or the timber.scss.liquid or which one ??

MS-WEB-DESIGNER
Shopify Partner
3012 181 485

Dear @Masaru 

Hope the following suggestion will help you

  • From your Shopify admin, go to Online Store > themes.
  • Locate your current theme and then click Actions > Edit code.
  • After that in the Assets folder, click to open your theme.scss.liquid file.
  • Go to the very bottom of this file and paste the following code:

 

/* Start */
.announcement-bar__message > b { font-weight: bold; }
/* End*/

 

  • Ensure that the code was copied exactly from this guide and pasted correctly, making sure no characters or symbols are missing.
  • Save and check your theme by refreshing it.