You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: files/en-us/web/api/element/scrollwidth/index.md
+78-60Lines changed: 78 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -26,73 +26,91 @@ without a need for horizontal scrollbar, its `scrollWidth` is equal to
26
26
27
27
## Value
28
28
29
-
A number.
29
+
An integer.
30
30
31
31
## Examples
32
32
33
+
### Detecting overflowing content
34
+
35
+
In this example, we use the `scrollWidth` property to check if the content of an element is overflowing its boundaries. We have two `div` elements, the first with a width of `100px`, and the second without a fixed width. Their content is exactly the same, and we display a message about whether each one is overflowing its container.
0 commit comments