1

I have the following code:

<div className={css.serviceInfo}>
        {availableServicesArray.map(service => {
          return(
            <span className={css.extraInfoLabel}>{service}</span>
          )
        })}
      </div>

which renders like this :

enter image description here

My question is: How can I make the span's text not be cut and go to the next line instead. I have tried with white-space:nowrap and white-space: initialbut none work.

Any idea how to do this ?

Bogos Robert
  • 193
  • 2
  • 9

1 Answers1

1

Try giving

display: inline-block;

to the span

Abin Thaha
  • 4,493
  • 3
  • 13
  • 41