HTML CSS examples for CSS Layout:Text
Break all text inside span
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #main {<!-- ww w . j av a 2 s .c om--> border:2px solid Chartreuse; width:100px; } .wrapper { display:inline-block; } span { display:block; word-break:break-all; } </style> </head> <body> <div id="main"> <p class="wrapper"> <span>foo1</span> <span>foo2</span> <span>loooooooooooooooong foooooooooooooooooooo</span> </p> </div> </body> </html>