Adding CSS to the Chat Widget | Community
Skip to main content

Adding CSS to the Chat Widget

  • August 21, 2022
  • 0 replies
  • 0 views

Hello there,

I am trying to add custom CSS to the Chat widget from, following this approach:

https://github.com/Ajhad1/Zendesk-Customizations/blob/main/Web-Widget/Add-CSS-To-Web-Widget/index.html

While this works for the launcher iframe, which is already present in the DOM when the page loads, it does not seem to work with the chat form iframe (whose id is #webWidget). I am trying to add a style tag in the callback function of

zE('webWidget:on', 'open', function() {here...}),

but the document.querySelector('#webWidget') is stiil null at this stage.

How is it possible to add custom CSS to the chat itself?

Thanks,

Mchal TS