How can I prevent a paragraph in one of two adjacent div containers from having a line break without changing the container's size? The surrounding div uses display: flex
to position its children side by side. Currently, I've applied the following CSS styles to the paragraph:
white-space: nowrap;
overflow: hidden;
width: 300px;
This solution works, but I want the paragraph to adapt to the normal size of the container and not exceed it. If it does, I'd like the container to maintain its original size while cutting off any excess text within the paragraph.