Report this

What is the reason for this report?

Any recommendations on how to resize the box?

Posted on December 18, 2024

We applied the CSS rule #proChatIframeContainer { z-index: 999999 !important; } to bring the chat bubble to the front, but now we’d like to reduce its size. Do you have any recommendations on how to resize the box? We are using WordPress.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hey there!

This would depend on many factors but in general, to resize a bubble container, you can use CSS properties like width and height on the #proChatIframeContainer element. Here’s an example:

#proChatIframeContainer {
  z-index: 999999 !important;
  width: 300px; /* Adjust to your preferred width */
  height: 400px; /* Adjust to your preferred height */
  max-width: 100%; /* Ensures it doesn't exceed the parent container */
  max-height: 100%; /* Prevents it from overflowing vertically */
}

You can tweak the width and height values to fit your design needs. If you want to maintain the aspect ratio of the chat bubble, you could also use transform: scale() to resize it proportionally:

#proChatIframeContainer {
  z-index: 999999 !important;
  transform: scale(0.8); /* Shrinks the size to 80% */
  transform-origin: bottom right; /* Adjust origin to control where the scaling occurs */
}

If the chat box includes an iframe or specific content inside the container, you may need to add similar styles to the iframe itself:

#proChatIframeContainer iframe {
  width: 100%; /* Make iframe take up the full container */
  height: 100%;
}

Make sure to clear any caching in your WordPress setup or browser to see the changes. Let me know if this works for you or if you need any further tweaks! 😊

- Bobby

To resize the chat bubble (or the container element), you can modify its CSS properties like width, height, and possibly adjust padding and margins to ensure it maintains its visual integrity. Since you’re using WordPress, you can apply these changes directly in the theme’s CSS or via a customizer.

Here’s how you can resize the chat bubble container:

Step 1: Customize the CSS

You can modify the existing #proChatIframeContainer rule to include width and height. For example:

#proChatIframeContainer {
    z-index: 999999 !important; /* Keeps the element on top */
    width: 300px !important;   /* Adjust the width */
    height: 300px !important;  /* Adjust the height */
    bottom: 20px;              /* Optional: Adjust positioning */
    right: 20px;               /* Optional: Adjust positioning */
}
  • Width and Height: Specify dimensions to resize the box.
  • Bottom and Right: If needed, reposition the chat bubble to fit the new size.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.