I create one table in html and this table width is 988 px and tr width is 100% table width.
In table tag exist 5 td tag that this td tag width 20%.
When I get with these tags with jQuery (td tag) show me in console this :
198
197
198
197
198
but I see this tags width in console 197.59.
I want get this value not these 197 or 198.
More precise than element.offsetWidth is:
element.getBoundingClientRect().width
it shows exact width as rendered by the browser.
MDN reference: getBoundingClientRect
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