Hi there,
I need advice on a development issue I’m facing with a page that includes a horizontal scroll section.
I’ve seen a lot of similar questions on the Webflow forum go unanswered, which is a real shame. I still do hope I’ll get some response to mine, though, as I’m pretty sure there must be a simple solution which I’m just missing.
Here’s the situation:
I’ve built a page with the following structure:
- Track div: Display block, height: 400VW
- Camera div: Display block, height: 100VH, width: 100VW
- Frame div: Display flex, height: 100VH
Within the Frame div, I have several content sections, some of which have widths (or min-widths) set to Auto / Max-Content to ensure responsiveness.
If I use fixed widths (e.g., 30VW), the content would overflow when the screen is resized, as there’s a lot of text in tables.
The interaction I’ve set up is designed to move the content along the X axis from 0% to 100%. However, I’m struggling to calculate the correct movement length. The movement should be equal to the length of the Frame div minus 100VW, but I don’t know how to determine the length of the Frame div since it’s dynamic.
Here are my questions:
- Is there a workaround to calculate the movement length for dynamic content within the Frame div?
- Is there a better way to ensure the Frame div resizes properly while using VW units for its inner sections?
- I considered using REM units to reduce resizing issues on narrower screens, but I’m unsure how to subtract 100VW from this value, as it doesn’t seem possible to insert a calc() expression into the interaction.
Here’s my read-only link:
https://preview.webflow.com/preview/free-jabriya?utm_medium=preview_link&utm_source=designer&utm_content=free-jabriya&preview=48af5e00dcd508987f7d5e9d169321d0&pageId=66bbdcce67f3b67d28ba90e8&workflow=preview
Any guidance or suggestions would be immensely appreciated!
Best regards,
A.