offline version v3


201 of 264 menu

clientTop property

The property clientTop contains the width of the top border (border-top value).

Syntax

element.clientTop;

Example

Let's find out the width of the top border of an element:

<div id="elem"></div> #elem { width: 100px; height: 100px; border: 10px solid black; } let elem = document.querySelector('#elem'); console.log(elem.clientTop);

The code execution result:

10

See also

  • the clientLeft property
    that contains the width of the left border
enru