Automatic line feed Div { Word-wrap: break-word; Word-break: normal; } Force an English word to break the line www.111cn.net Div { Word-break: break-all; } 1. (ie browser) white-space: normal; word-break: break-all; the former follows the standard. # Wrap {white-space: normal; width: 200px ;} Or # Wrap {word-break: break-all; width: 200px ;} Eg. <Div id = "wrap"> ddd111111111111111111111111111111111www. 111cn. net11111111111111111111111 </div> Effect: line breaks can be implemented. 2. (firefox) white-space: normal; word-break: break-all; overflow: hidden; the same ff does not have a good implementation method. You can only hide or add a scroll bar, of course, it is better to not add a scroll bar! # Wrap {white-space: normal; width: 200px; overflow: auto ;} Or # Wrap {word-break: break-all; width: 200px; overflow: auto ;} Eg. <Div id = "wrap"> ddd111111111111111111111111111www. 111cn. Net111111111111111111111111 </div> Effect: The container is normal and the content is hidden. For table 1. (ie browser) use the style table-layout: fixed; Eg. <Style> . Tb {table-layout: fixed} </Style> <Table class = "tbl" width = "80"> <Tr> <Td> abcdefghigklmnopqrstuvwxyz 1234567890 </Td> </Tr> </Table> |