I ran into really 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 it works like expected, text fits in p, and has padding,
While in Chrome and IE text gets out of box.
What causes this? Any workarounds?
Add display: inline-block;
to p
element:
http://jsfiddle.net/Fq68D/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With