How to Apply Word Wrap Return on Overflow in a DIV
When programming a website using div separators, by default the text does not wrap unless you have set the parameter. Therefore, if you have a block of text that is longer than your div width or height, it stretches the div. This can be resolved by editing your div cascading style sheet, or CSS, parameter in the header or in the separate CSS document.
Instructions
-
-
1
Open either your Web page or your CSS file (if you are using one) in Notepad or another dedicated Web editor.
-
2
Locate the div parameter in your CSS section. If you are not using one, add the following in the CSS section:
div { }
-
-
3
Insert, within the div tag, the following code:
word-wrap: break-word
Your div tag should now read:
div { word-wrap: break-word }
-
4
Save the page or CSS file.
-
1