I am using percentages to create the width of a div
with the display
property set to table
. In my case, the width of the parent div
is 88.7969px. So it stands to reason that setting the width
of child div
with the display
property set to table
to 100% would compute the width to be 88.7969px. This, however is not the case. It computes the width to be 88px.
Is a fractional pixel width of table
displays not supported?
Here's the fiddle. If you inspect the elements, you'll see the content
wrapper at 88.7969px but the inner child div
at 88px.
No there is nothing to do with display:table
with a fractional pixel value.
It completely depends upon the Browser and Browser Version which you are using.
Current Versions as of 9 FEB 2016::: on Google Chrome the div with fractional pixel value with display:table
is rounded up, while in Firefox it is not and also in IE it is not rounding up.
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