This example demonstrates how to disable text wrapping inside an element:
HTML file: | Displayed by browser: |
---|---|
<style>
p { white-space: nowrap; } </style> <body> <p> This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. </p> </body> |
This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. Why would anyone want this? This is some text in a paragraph. |