AdBlock Detected!
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.
CSS Wrap |
Text wrap can be achieved in CSS using the white-space property. Common values of this property are as follows:
Let's look at the examples below: Example 1
The HTML code,
renders This line shows the layout with white-space:normal. In Example 1, text wraps to the next line when it reaches the right edge of the pink box. Example 2
The HTML code,
renders This line shows the layout with white-space:nowrap. In Example 2, text does not wrap to the next line when it reaches the right edge of the pink box. Example 3
The HTML code,
renders These two lines show the layout with ... white-space:pre. In Example 3, text is displayed exactly as how it was shown in the HTML document, and does not wrap to the next line when it reaches the right edge of the pink box. Note that in CSS 3, two additional properties, text-wrap and word-wrap, can be used to control text wrap using CSS. |
Our website is made possible by displaying ads to our visitors. Please supporting us by whitelisting our website.