javascriptreactjsspannedmakestyles

I can't get this map with buttons to span but it works ok for another map where is the problem


I learn JavaScript React and now I have this question:

I have this Codesandbox

In the Docs about span I read but I can't get the buttons in the image here to span like they do on the right side:

I removed the span code and now tried with css but no luck. I think I have tried all the tricks in the book so I must be missing something really beginner mistake.

enter image description here


Solution

  • You have wrapped your tag with a div which is a block element. Remove this <div className="tagInput"> . It should work fine .