html - Weird issue with padding and whitespace: nowrap in Chrome and IE -


i ran weird issue. ( http://jsfiddle.net/fq68d/ )

html

<div>     <p>hello world!</p> </div> 

css

div {     display:inline-block; } p {     background-color:#ccc;     padding:10%;     white-space:nowrap; } 

in firefox works expected, text fits in p, , has padding,

while in chrome , ie text gets out of box.

enter image description here

what causes this? workarounds?

add display: inline-block; p element:

http://jsfiddle.net/fq68d/1/


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -