Window outerWidth property
- Previous Page outerHeight
- Next Page pageXOffset
- Go to the Previous Level Window Object
Definition and usage
outerWidth
The property returns the external width of the browser window, including all interface elements (such as toolbars/scroll bars).
outerWidth
The property is read-only.
See also:
Instance
Example 1
Get the height and width of the browser window:
let width = window.outerWidth;
let width = outerWidth;
Example 2
All height and width properties:
let text = "<p>innerWidth: " + window.innerWidth + "</p>" + "<p>innerHeight: " + window.innerHeight + "</p>" + "<p>outerWidth: " + window.outerWidth + "</p>" + "<p>outerHeight: " + window.outerHeight + "</p>";
Syntax
window.outerWidth
Or:
outerWidth
Return value
Type | Description |
---|---|
Number | The width of the browser window, including all interface elements, in pixels. |
Browser support
All browsers support window.outerWidth
:
Chrome | IE | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
Chrome | IE | Edge | Firefox | Safari | Opera |
Support | 9-11 | Support | Support | Support | Support |
- Previous Page outerHeight
- Next Page pageXOffset
- Go to the Previous Level Window Object