var clientHeight = document.getElementById('myDiv').clientHeight;
or
var offsetHeight = document.getElementById('myDiv').offsetHeight;
clientHeight
includes padding.
offsetHeight
includes padding, scrollBar and borders.
More Related Contents:
- Why does not javascript show the output when button is clicked
- Pure JavaScript toggle for select / deselect all checkboxes [duplicate]
- Create a field to accept tags HTML/JS [closed]
- Can I hide the HTML5 number input’s spin box?
- Can I have an element with an ID that starts with a number?
- How To Get Font Size in HTML
- Cache busting via params
- Simulation background-size: cover in canvas
- How to Increase browser zoom level on page load?
- How to select nth line of text (CSS/JS)
- Hide scrollbar while still being able to scroll with mouse/keyboard [duplicate]
- execCommand() is now obsolete, what’s the alternative?
- How to create a custom scrollbar on a div (Facebook style)
- Have a div cling to top of screen if scrolled down past it [duplicate]
- HTML book-like pagination
- Creating a select box with a search option
- Passing mouse clicks through an overlaying element
- Highcharts – issue about full chart width
- Fill available spaces between labels with dots or hyphens
- How to make text over flow into two columns automatically
- How to resize Twitter Bootstrap modal dynamically based on the content
- Wait cursor over entire html page
- Retain scrollbar position even after reloading using javascript
- How can I make an image carousel with only CSS?
- HTML5 Drag and Drop – No transparency?
- How do I hide the address bar on iPhone?
- CSS: Select element only if a later sibling exists
- input:invalid css rule is applied on page load
- How to show calendar popup when input[type=”date”] is on focus
- In jQuery mobile, what’s the diff between tap and vclick?