Back to Community

How to Center and Position Your WhatsApp Chat Button on Desktop and Mobile

8 threads Sep 10, 2025 PluginClick to chat – holithemes

Content

One of the most common questions users have about the 'Click to Chat – HoliThemes' plugin is how to control the position of the floating WhatsApp button, especially when trying to center it or have it appear differently on desktop and mobile devices. This guide will walk you through the most effective methods to achieve this.

Why Positioning Can Be Tricky

The plugin's primary settings allow you to set a global position for the button (e.g., bottom 5%, right 50%). However, because these percentage-based values are relative to the screen size, a position that looks centered on a mobile device might not be centered on a wider desktop monitor. The plugin's interface does not have separate positioning controls for different devices in its free version, which is the root of this common challenge.

Common Solutions for Centering and Device-Specific Positioning

1. Using the Plugin's Built-in Settings

For a simple centered look, you can use the plugin's own settings. Navigate to the plugin's settings page and look for the 'Position to Place' or similar fields. To horizontally center the button, set the horizontal position value (often labeled 'Right' or 'Left') to 50%. You can then adjust the vertical position (e.g., 'Bottom') to a percentage like 5% to place it near the bottom of the screen.

2. Hiding the Button on Specific Devices

If your goal is to only show the button on mobile and hide it on desktop (or vice versa), you do not need custom CSS. The 'Click to Chat – HoliThemes' plugin includes a direct option for this. In the settings, look for a section like "Style for Desktops" and select the "Hide on Desktop Devices" option. This will automatically handle the visibility without any code.

3. Adding Custom CSS for Fine-Tuned Control

For advanced control over the button's position on specific screen sizes, you will need to add custom CSS. This is typically done in your theme's customizer or in a custom CSS plugin.

To adjust the position only on mobile devices:

@media (max-width: 1024px) { 
    .ccw_plugin {
        right: 50% !important;
        /* Adjust this value to fine-tune the centering */
    }
}

To adjust the position only on desktop:

@media (min-width: 1025px) { 
    .ccw_plugin {
        right: 50% !important;
    }
}

Important Note: The 1024px value is an example breakpoint; you should adjust it to match the screen width where your site switches from mobile to desktop layout. The !important rule is often necessary to override the plugin's inline styles.

4. Using Shortcodes for Inline Content

If you want to place a WhatsApp button inline within your page's content rather than having it float on the screen, you can use the provided shortcode. Once you add the shortcode to your page or post, you can center it using your WordPress editor's alignment tools or by wrapping it in a centered div.

What Isn't Possible in the Free Version

Based on community threads, it is clear that the free version of the plugin does not include native settings for assigning different positions to the floating button on desktop versus mobile. This level of device-specific control is a feature reserved for the premium version. Similarly, specific RTL (Right-to-Left) language support for positioning may require custom CSS or the premium plugin.

Need More Help?

If these solutions don't resolve your issue, the best course of action is to search for your specific problem on the official WordPress plugin support forum for 'Click to Chat – HoliThemes', where many common issues have already been discussed and solved by the community.