I justed noticed jQuery's width()
gets different results in current chrome and firefox.
Im targeting a li
element, in the inspector it shows me a width of 108.531px
Since jQuery's width()
outputs an integer it should be 109..
But in Chrome this resorts to 108, Firefox logs 109..
I tried it with these attributes:
border: none;
outline: none;
box-sizing: border-box;
I found this post, but am uncertain if this still is state of the art:
$("#container")[0].getBoundingClientRect().width
How to make jQuery to not round value returned by .width()?
Why does jQuery have this inconsistency?