Adding Custom CSS to Chat Window
This section contains essential information and usage guidelines for applying advanced custom CSS to the AI Agent chat window inside BotPenguin.
Last updated
Was this helpful?
This section contains essential information and usage guidelines for applying advanced custom CSS to the AI Agent chat window inside BotPenguin.
Custom CSS allows you to apply advanced visual customizations to the chat window interface of your AI Agent. It enables precise control over layout, colors, spacing, and other UI elements beyond standard theme settings, helping align the chat experience with your websiteβs design system.
π¨ Enables advanced styling beyond default theme controls
π§© Helps align chat UI with existing website branding
π§ Offers granular control over chat window components
π Supports enterprise-level UI customization needs
π‘ Ideal for teams with frontend or design expertise
Log in to your BotPenguin account and select the desired AI Agent.
Navigate to βAgent Settingsβ.

Open the βAdvanceβ card.
Scroll down to locate βCustom CSS for Advanced Designsβ.

Install the AI Agent chatbot on a test website (for example, using W3Schools).
Right-click on the chat window and select βInspectβ.
Use the element selector to identify:
Relevant class selectors (.)
Relevant ID selectors (#)
These selectors represent the chat window components you want to customize.
Copy the required class or ID from the Inspect panel.
Paste it into Custom CSS for Advanced Designs.
Add your desired CSS properties inside curly braces { }.
Example:

If you want to reduce the extra whitespace that appears between the right side of the bot message box and the right edge of the chat window (especially on mobile screens), you can use the following CSS. This helps shorten the distance and makes the chat layout look more compact.
Add this CSS to your custom CSS or website stylesheet:
This CSS ensures that on smaller screens (max-width: 600px), the chat window adjusts its width automatically and removes unnecessary empty space on the right side of bot messages.
Click βSave Changesβ to apply the customization.
Refresh the website where the chatbot is installed.
Confirm that the chat window reflects the applied styling changes.
π Congratulations, you have successfully completed this section! You're one step closer to mastering BotPenguin.
Custom CSS can be used to style chat window containers, message areas, headers, footers, and other internal UI elements.
Basic CSS knowledge is recommended. For complex designs, a frontend developer should assist.
No. Launcher icon styling is handled separately using Launcher Icon Custom CSS.
Yes. Invalid or conflicting CSS can impact layout or visibility. Always test changes first.
If you still have questions for our team, write to us at support@botpenguin.com. Weβll get back to you within 48 hours.
Last updated
Was this helpful?
Was this helpful?
#bp-chat-window {
background-color: #f5f5f5;
}@media screen and (max-width: 600px) {
#chatWindow {
min-width: fit-content;
}
}