Float Physics not working on mobile devices
-
Hi everyone!
I have a question about the Float Physics feature.
It seems to work perfectly on desktop, but not on mobile (tested on an iPhone 17 in both Safari and Chrome). Is there anything I need to be aware of or any settings that are required for mobile? The “Disable on Phone” option is not enabled, so that shouldn’t be causing the issue.
Here’s my current test page:
https://wyhof.bergerberg.ch/test/On my end, the gold cup only floats on desktop, while it remains static on mobile.
Thanks in advance for any help!
-
hey! can you create a custom phone layout, make the element a little smaller
make sure in the custom from layout, the float physics are enabled for that element too, and try again?See, with the automatically created mobile layout, all elements are full width.
But an element needs to be smaller for it to be able to float around. If it has the full width of the layout, it can float around.I think it's because of that.
-
yeah, because on an automatic phone layout, everything's full width. The physics wouldn't really do much anyway. It's also actually disabled for automatically created phone layouts, so it will only work if you actually create a custom phone layout.
-
Hey Armin, Thanks for your quick response! I tested it, and it works.
For it to work reliably, it’s best to enable “Constrain to Viewport”. Otherwise, it becomes buggy on mobile, even if the row height is set to the browser height.
We also code custom websites or bespoke Lay features. Drop me a line at info@laytheme.com or check out my work at arminunruh.com.
Want to support my work? paypal.me/arminunruh
For paid 1-on-1 Lay Theme Coaching, contact Audrey (audrey@cyberslayers.work) or me (info@laytheme.com).
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it