---
title: VisualViewport.offsetleft
slug: Web/API/VisualViewport/offsetleft
tags:
  - API
  - Property
  - Reference
  - Visual Viewport API
  - VisualViewport
  - offsetleft
  - viewport
browser-compat: api.VisualViewport.offsetLeft
---
{{APIRef("Visual Viewport")}}

The **`offsetLeft`** read-only property of the
{{domxref("VisualViewport")}} interface returns the offset of the left edge of the
visual viewport from the left edge of the layout viewport in CSS pixels.

## Syntax

```js
var offsetLeft = VisualViewport.offsetLeft
```

### Value

A double.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}
