Window screen.availWidth

Example

Get the available width of your screen:

let width = screen.availWidth;
Try it Yourself »

More "Try it Yourself" examples below.


Description

The availWidth property returns the width of the user's screen.

The availWidth property returns the width in pixels.

The availWidth property returns the width minus interface features like the Windows Taskbar.

The availWidth property is read-only.

Note

To get the height of the screen, use the availHeight property.



Syntax

screen.availWidth

Return Value

Type Description
A numberThe width of the user's screen in pixels.

More Examples

All screen properties:

let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>" +
"Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>" +
"Color depth: " + screen.colorDepth + "<br>" +
"Color resolution: " + screen.pixelDepth;
Try it Yourself »

Browser Support

screen.availWith is supported in all browsers:

Chrome Edge Firefox Safari Opera IE
Yes Yes Yes Yes Yes Yes


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.