js how to get element csswidth

Solutions on MaxInterview for js how to get element csswidth by the best coders in the world

showing results for - "js how to get element csswidth"
Hassan
03 Jun 2018
1document.getElementById("id").getBoundingClientRect().width
2//or
3document.getElementById("id").style.width
4//document.getElementById("id").getBoundingClientRect() - will return all css properties of the emelemnt