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.
what causes this? workarounds?
add display: inline-block;
p
element:
Comments
Post a Comment