HTML | DOM clientWidth Property
The DOM clientWidth Property is used to return the viewable width of a specific element including padding but excluding the measurement of margin, border and scrollbar width. This property only returns the actual width of an element that is viewable or visible to the user. It is a read-only property.
Return Value: It returns a Numeric value which represent the viewable width of an element.
Before Clicking on the Button:
After clicking on the Button
Supported Browsers: The browser supported by DOM clientWidth property are listed below:
- Google Chrome 1.0
- Internet Explorer 4.0
- Firefox 1.0
- Opera 3.5
- Safari 1.0
Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML course.