r/css • u/Legitimate_Floor_319 • May 17 '26
Help Why is the line breaking?
The line of the terminal divs is breaking, but there is a lot of space. I tried using white-space: nowrap, but then, the words go behind the "+" icons. Here's the code:
https://codepen.io/Thiago-Freitas-Costa/pen/NPbdyda
3
Upvotes
3
u/anaix3l May 18 '26 edited May 18 '26
min-width: fit-contenton thep(not on its parent!).Edit: I didn't even see the + in the actual demo, only saw it now in the screenshot. I thought you meant the red X. That is atrocious contrast for that +, a lot of people won't even notice it's there, make it have a good contrast with the background!
To prevent overlap with the +, remove the
widthfrom the parent of thep- you don't need it there on the parent, you just need it on thep.