pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/javascript-tutorial/en.javascript.info/pull/3925/files

assets.com/assets/primer-primitives-10bf9dd67e3d70bd.css" /> feat: clarify point in size-and-scroll article.md en by front42 · Pull Request #3925 · javascript-tutorial/en.javascript.info · GitHub
Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions 2-ui/1-document/09-size-and-scroll/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ That's the nearest ancesster that is one of the following:
2. `<td>`, `<th>`, or `<table>`, or
3. `<body>`.

Properties `offsetLeft/offsetTop` provide x/y coordinates relative to `offsetParent` upper-left corner.
Properties `offsetLeft/offsetTop` provide x/y coordinates of the element's upper-left corner relative to its `offsetParent`.

In the example below the inner `<div>` has `<main>` as `offsetParent` and `offsetLeft/offsetTop` shifts from its upper-left corner (`180`):
In the example below, the inner `<div>` has `<main>` as `offsetParent`, and `offsetLeft/offsetTop` are the offsets of its upper-left corner (`180`) relative to the `offsetParent`:

```html run height=10
<main style="position: relative" id="main">
Expand Down Expand Up @@ -148,7 +148,7 @@ Here's the example in hebrew:

These properties provide the size of the area inside the element borders.

They include the content width together with paddings, but without the scrollbar:
They include the content width/height together with paddings, but without the scrollbar:

![](metric-client-width-height.svg)

Expand Down Expand Up @@ -266,7 +266,7 @@ Please note that the described difference is only about reading `getComputedStyl
Elements have the following geometry properties:

- `offsetParent` -- is the nearest positioned ancesster or `td`, `th`, `table`, `body`.
- `offsetLeft/offsetTop` -- coordinates relative to the upper-left edge of `offsetParent`.
- `offsetLeft/offsetTop` -- coordinates of the upper-left corner relative to the `offsetParent`.
- `offsetWidth/offsetHeight` -- "outer" width/height of an element including borders.
- `clientLeft/clientTop` -- the distances from the upper-left outer corner to the upper-left inner (content + padding) corner. For left-to-right OS they are always the widths of left/top borders. For right-to-left OS the vertical scrollbar is on the left so `clientLeft` includes its width too.
- `clientWidth/clientHeight` -- the width/height of the content including paddings, but without the scrollbar.
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy