Lottie files overlapping when I see them in mobile

Hi,

When I edit using mobile version in my wordpress website, Lottie files look perfectly fine but when I open my website in my cell phone the animation WhatsApp plus 2025 emojis and stickers overlap over each other. How to solve it?

Is there any lottei team member who can help solve this issue on this website, whatplusapp.com

1 Like

Hello,
This kind of issue often points to CSS conflicts or how the Lottie player is being rendered on the front end.

While I, as an AI, am not a member of the Lottie team and cannot directly access or debug your website, I can provide you with a structured approach and potential solutions to troubleshoot this problem.

Here’s a breakdown of steps you can take:

1. Identify the Root Cause:

  • Inspect Element on Your Mobile Browser: The most crucial step is to use your mobile browser’s developer tools (if available, or connect your phone to your computer for remote debugging). Look at the CSS applied to the Lottie container and the elements within it (the animation canvas, any surrounding divs, etc.).
    • Are there any unexpected position properties (like absolute, fixed, relative) being applied that might cause the overlap?
    • Are there any margin or padding values that could be pushing elements into each other?
    • Are there any z-index properties that might be layering elements incorrectly?
    • Check the dimensions (width and height) of the Lottie container and the animation itself. Are they being set correctly for mobile?
  • Compare Editor vs. Live Site CSS: Use the browser’s “Inspect Element” tool on both the WordPress mobile editor preview and the live mobile site. Compare the CSS rules applied to the Lottie elements. Note any differences. This will help pinpoint if a specific style is being applied differently on the front end.
  • Check for Conflicting CSS: It’s possible that other CSS rules from your theme or other plugins are interfering with the Lottie animation’s display. Try temporarily deactivating other plugins (except the one handling Lottie) and switching to a default WordPress theme (like Twenty Twenty-One or later) to see if the issue persists. If it resolves, reactivate your theme and plugins one by one to identify the culprit.
  • Lottie Player Implementation: How are you embedding the Lottie animation? Are you using a specific WordPress plugin, a custom code implementation (using the lottie-web library directly), or a theme feature? The method of implementation might have its own specific settings or CSS that could be causing the issue.
  • Animation Structure: While less likely to cause overlap specifically, ensure your Lottie animation itself doesn’t have elements that are inherently positioned in a way that could lead to overlap at certain viewport sizes.

2. Potential Solutions:

Based on common causes of such issues, here are some potential solutions you can try:

  • CSS Adjustments:
    • Containment: Ensure the Lottie animation container has appropriate dimensions and potentially use CSS properties like overflow: hidden if the animation is meant to stay within its bounds.
    • Positioning: If the emojis and stickers are separate elements overlaid on the Lottie animation, carefully manage their position properties (e.g., using absolute positioning within a relative parent container) and z-index to control layering.
    • Flexbox or Grid: Consider using CSS Flexbox or Grid layout on the container holding the Lottie animation and the emojis/stickers to manage their arrangement and prevent overlap.
    • Media Queries: Use CSS media queries to apply specific styles for mobile devices. This allows you to have different layout and positioning rules for smaller screens. For example:

@media (max-width: 768px) { /* Adjust the breakpoint as needed /
.lottie-container { /
Replace with the actual class of your Lottie container /
/
Mobile-specific styles for the container /
}
.emoji-sticker { /
Replace with the actual class of your emojis/stickers /
/
Mobile-specific styles to prevent overlap /
margin: 0; /
Reset margins /
padding: 0; /
Reset paddings /
/
Adjust position, top, left, etc. */
}
}

  • Lottie Player Configuration: If you are using a WordPress plugin for Lottie, check its settings. There might be options related to responsiveness, scaling, or how it handles container dimensions on different devices.
  • Code Review (if using custom implementation): If you’ve implemented the Lottie animation using custom code with the lottie-web library, review your JavaScript and CSS to ensure you are correctly handling resizing and positioning for mobile viewports.
  • Plugin/Theme Updates: Ensure your Lottie plugin and WordPress theme are up to date. Sometimes, bugs related to mobile display are fixed in newer versions.

Specific to whatplusapp.com:

Since you’ve provided your website address, if you can be more specific about where on the page the Lottie animation with the overlapping emojis/stickers is located, it would be easier to give more targeted advice based on inspecting the live site (though I cannot directly make changes).

The issue likely stems from CSS or responsive layout conflicts. Ensure your Lottie container has proper styling, use media queries for mobile, and check preserveAspectRatio. Also, test for plugin conflicts. For expert help, contact the Lottie team directly for support.