https://discord.gg/botpress logo
webchat v2 styles not applied
# 💻developers
b
hi guys, i'm new here. i already read some of you guys' comments about the styling problem. i also having a problem in here because the css doesnt apply. i just need to change the button icon, but i cant even change the button color. is there any advice? https://cdn.discordapp.com/attachments/1121494527727902891/1284914122638495887/image.png?ex=66e85d07&is=66e70b87&hm=a7fd9d54ef6930da7b3e96d35a7f95ef24c1ae4dabca7450d5ed87b71cd5d0a1&
w
have you tried including your css in your site?
b
do you mean my website code? or the botpress site?
w
in your website
b
that's what i am confused, where do i put it in?
is it just like regular css styling?
w
the style is correct, and putting it in webchat styles it should include in your embed code
but it there's a problem a workround is try to put in website
instead a pictue can you paste styles here so i try it
b
.bpFabContainer { background: red; // Change for your desired color } .bpFabIcon { background-image: url("https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.vecteezy.com%2Fpng%2F33882148-transparent-background-person-icon&psig=AOvVaw0RyB9S5_Fw64vXTTxUFWEW&ust=1726503620608000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCNiK1qetxYgDFQAAAAAdAAAAABAE"/); }
here you can try
the image is just some picture i copied from google, just to try
hi sorry for following up, is there any good update? 🥲
w
we can't use in website because classes are used by element in a iframe that have a diffrent domain, try to add
!important
in your styles pasted in webchat style area
b
alright, i'll try
thank you
w
I tried again, and I discovered that it works. - the sintax and link of image was wrong - the webchat on the dashboard or in the shared page doesn't use custom styles Give this a try on your page or using https://jsfiddle.net/
Copy code
css
.bpFabContainer {
    background: red !important; 
}
.bpFabIcon {
   background-image: url("https://mediafiles.botpress.cloud/2c56f350-6e19-406a-b018-a4781deb5ff3/integration/icon.svg");
}
2 Views