Streaming live at 10am (PST)

JS- Add extra spacing between string


#1

So I added typed.js to my “book online” page, the script is working fine but the words are too bunched together because of my font. Is there a way to add more spacing between each word? I tried adding more spaces as well as some googling but no luck. I’m a coding n00b, HELP!

https://preview.webflow.com/preview/dougs-spectacular-project-8f1ed7?utm_source=dougs-spectacular-project-8f1ed7&preview=75ac0bb219bb52e1a1a67d7197d845b8


Here is my site Read-Only: LINK
(how to share your site Read-Only link)


#2

You can use custom CSS to add word spacing. No JS is required.


#3

Even though the only place I want to add in the spacing is in this single line produced by my code?


#4

You can also try pressing Shift + Space to add more spaces.


#5

I use that on other parts of the page but that is not working in my string that appears


#6

Ah, since you are dynamically inserting the text, then the method I pointed out is the only way.


#7

I added it like this…

script
var typed = new Typed(’#typed-text’, {
strings: [‘What can brown do fo’, ‘What can we do for you?’],
typeSpeed: 75,
backSpeed: 25,
loop: false,
cursorChar: ‘_’,
backDelay: 1000,
startDelay: 2000,
word-spacing: 200%;
});

/script

with no luck, tried percentage too. Am I inserting this into the correct space?