How to leave a gap row in announcment bar

How to leave a gap row in announcment bar

evaoherjus
Excursionist
35 1 6

Hi!

I would like to write the announcment in 2 languages. How could I separate my text with a gap row so that the announcment would not be all in one row (different language separate row). Could someone provide me with a code please.

 

Many thanks

Eva

Screenshot_2023-05-08-22-47-31-602_com.android.chrome.jpg

Replies 3 (3)

PaulNewton
Shopify Partner
7722 678 1626

Hi @evaoherjus  Keep always in mind others do not see what you see or know what you know.
Always provide relevant context so others can understand, inspect or reproduce issues.
Context like: For theme problems store url or preview urls, exact demo urls, storefront password if any, theme name, example code, are any apps involved. For browser problems browser name& version, operating system, etc.
https://community.shopify.com/c/shopify-design/help-us-help-you/td-p/668159  

Good Luck.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


evaoherjus
Excursionist
35 1 6

I would like tu add a gap row there so that the announcment in 2 languages is not all in one pile. I am using Brooklyn Theme. Is there a code to do that?

IMG_20230509_124354.jpg

NomtechSolution
Astronaut
1245 113 160

To separate the text in your announcement bar into two rows for different languages, you can use HTML line breaks (<br>). Here's an example code snippet to illustrate the concept:

<div class="announcement-bar">
  <span class="language-1">Welcome to our store!</span><br>
  <span class="language-2">Bienvenue dans notre magasin !</span>
</div>

In the above example, the text for the first language is wrapped in a <span> element with the class "language-1", and the text for the second language is wrapped in a <span> element with the class "language-2". The <br> tag is used to create a line break between the two spans, effectively separating the text into two rows.

You can further customize the styling of the announcement bar and the text using CSS. Make sure to adjust the class names and styles according to your theme and preferences.