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

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -