tag to set the div’s height to document.documentElement.scrollHeight on load and resize.
To make a div element match the full height of the HTML document in Webflow and preserve that behavior after exporting the code, you need to control its height dynamically using CSS and avoid relying solely on viewport units.
100vh
May Not Workfull-height-div
) or a unique class (e.g., full-doc-height
).Add the following inside a tag in the Before tag section of Page Settings:
```javascript
```
This will dynamically set the div’s height equal to the total scrollable height of the HTML document.
overflow: hidden
or positioning
To make a div element match the full HTML document height in Webflow after export, assign it a unique ID or class, then use custom JavaScript to set the height dynamically to document.documentElement.scrollHeight
. Viewport units like 100vh
are not sufficient for this purpose.