css - editable div in table exceeds its percentage-width when content is very long -


i'm using chrome. have editable div inside table, width defined percentage. css below.

div#editable {     width:20%;     white-space:nowrap;         overflow:hidden;     border:1px solid darkgrey; } 

when adding long content div, width begins increase regardless of css definition. here demo link: http://jsfiddle.net/k5erc/. can try input more content div , see width growing.

however, if width defined px or em, there no such problem.

could tell me how fix width? thanks!

if wish text wrap, width stays same need rid off white-space:nowrap; otherwise add table-layout:fixed; table css

see updated fiddle here http://jsfiddle.net/k5erc/1/


Comments

Popular posts from this blog

c - sscanf() double showing zeros -

command line - Python: find current directory of remote "cmd.exe" processes -

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -