Inline text creates unwanted space between lines

Hi there,

I’m using inline text to concatenate texts from the CMS with comma’s. However, this results in unwanted space between the lines (see screenshot). How can I get rid of this space? Hope someone can help me with this :smiley:

Regards,
Sebastiaan

Try using a Custom Code embed instead. Add your field and then a comma within it.

Also, not sure if there is any padding on your credits_item class.

If you have your read only link I can take a look. :slight_smile:

Hi @Drew_Schafer ,
Thanks, that solves it! :smiley: Do you also know how I can remove the comma after the last item?

Hi @bearlybrave,

Could you please provide us with a Read-only link to your website so we can see what’s happening within your project?

Cheers!

Hi @Drew_Schafer and @mww,
Here’s my Read-only link: Webflow - Minimal Collective - BB. The problem is in the Editorials Template page. Only a few of these pages are filled, so it’s best to check this item: ‘_This is an editorial page and this is the title of the article’ (see the screenshot in my first post).

I also run into another problem related to this. On mobile, the words don’t wrap exactly like I want them to. For instance, ‘Jesse Plum’ is placed on a new line, while ‘Jesse’ should fit behind ‘Elshout,’ (see screenshot). Do you know how to achieve this?

Hi @bearlybrave,

I’m not sure about the wrapping, I don’t think it’s possible considering it’s a separate item and so it doesn’t wrap like a paragraph - I may be wrong though.

As for the comma at the end, I wrote some JS that should fix this:

<script>
const lastItem = document.querySelector(".credits_item:last-child > .w-embed ").innerHTML
const newStr = lastItem.replace(/,/g, '');
document.querySelector(".credits_item:last-child > .w-embed ").innerHTML = newStr
</script>

Please add this to the bottom of Page Settings > Custom Code > Before <body> tag, republish and see if it works for you!

Let me know how you go.

Hi @mww,

Thanks so much, this is exactly what was needed to solve the problem of the last comma.

Have a great day!
Sebastiaan

Hi @mww,

1,5 week ago I posted an issue that I think you might also have the solution for, as it looks a bit similar as the problem above. I would really appreciate it if you would take a look at it. Here’s the link to the topic:

Hope to hear from you!