javascript - Can't seem to get my div's label to overflow the way I want it to -


i have html:

<div id="contentpanelheading" class="div">     <label id="originalnamelabel" class="label">thisisareallylongblockoftextthatwilloverflowtheparentdiv</label> </div> 

this css:

.div {     background-color: red;     width: 100px;     height: 100px; } 

an example jsfiddle available here.

how can make text overflow block, follows:

|bigwordsshould| |bealignedliket| |hisinsidemydiv| |andonlyoverflo| |wgoingdownward|  slikethis,outs  isdeofthedivfr  omthebottom 

note how letters overflow div going down , how large word such gets broken down. how can this? have tried bunch of different tricks looked none seemed work me.

you need specify css properity word-wrap:

.label {   word-wrap: break-word;   } 

jsfiddle


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -