Like SystemiConnectFri 15 Oct 2021, 04:50
Auto Save MessagesLGforumFri 26 Feb 2021, 13:31
New tutorial questionTheCrowMon 15 Feb 2021, 08:12
Support iOS Emojis (and other platforms)LGforumSun 14 Feb 2021, 01:25
LGforum (2806)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Mr.Easybb (1587)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Bloodbath (745)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Rukiafan (533)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Dom (513)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
puppycheese (446)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
pedro (330)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Neymar (301)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Hitsu (281)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 
Flora (275)
Change the background of the chat Vote_lcapChange the background of the chat Voting_barChange the background of the chat Vote_rcap 


Change the background of the chat

avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Tue 02 Jul 2013, 21:14
Hi!

My chatbox has the same background that the forum:

Change the background of the chat Ad161a45c628561d909657df3e9ff062


Could anybody tell me what's the CSS code to change the background of the chat? (the red square)

Change the background of the chat 8e41192435e337dc6a79789c2b9fb97d
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Thu 04 Jul 2013, 11:24
up
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Fri 05 Jul 2013, 11:37
up
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Fri 05 Jul 2013, 12:21
Thats the background of the tab holding element. [ic]#achat_tabs { backgorund: blurgh ... }[/ic]
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Fri 05 Jul 2013, 13:19
I have put this in the CSS Stylesheet:

Code:
[panda=css]#achat_tabs {
   background: #FAFAFA !important;
}

But the background doesn't change
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sat 06 Jul 2013, 00:53
I'd recommend inpecting the element then. If your unsure how, all browsers have a built in Dom inspector, just a quick google will tell you how to use it. It's really simple. Look at the element that has that background.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sat 06 Jul 2013, 05:27
It is actually the chat background LG, you have in your css

Code:
[panda=css]#achat_tabs + #chatbox {
top: 55px;
}

Which moves the entire element done revealing the body background of the users forum.

What you can do is

Code:
[panda=js]$(avacweb_chat.id('chatbox')).css('background','#000');

or

Code:
[panda=js]avacweb_chat.id('chatbox').style.background="#000";

LG will correct me if the second one is wrong.
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Sat 06 Jul 2013, 12:10
I have put this code but doesn't change

Code:
[panda=css]$(avacweb_chat.id('chatbox')).css('background','#000');
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sun 07 Jul 2013, 00:59
You need the first code in Easybbs post. Only the first code in that post is CSS.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Sun 07 Jul 2013, 05:19
Yes the first code is the default CSS, the other two codes would be added to the AWC JavaScript like so


Code:
[panda=js]//AWC CORE JS HERE
$(avacweb_chat.id('chatbox')).css('background','#000');
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Sun 07 Jul 2013, 14:41
I have added this code in the CSS Stylesheet:

Code:
[panda=css]#achat_tabs + #chatbox {
top: 55px;
}

And this code in the AWC JavaScript:

Code:
[panda=js]$(avacweb_chat.id('chatbox')).css('background','#fafafa');


But it doesn't work...
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Sun 07 Jul 2013, 22:25
No lol. You don't add both of them. You only need the CSS.
Code:
[panda=css]#achat_tabs + #chatbox {
    background: 'YOUR BACKGROUND COLOR';
}
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Mon 08 Jul 2013, 18:22
It doesn't work neither =(
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Mon 08 Jul 2013, 23:53
Yes I know it doesn't work. The achat_tabs + chatbox is for the actual styles what you are trying to style is the body and sense it is an iframe your best option is to use the JS I provided

Code:
[panda=js]avacweb_chat_config.add_event('onload',function() {
$(avacweb_chat.id('chatbox')).css('background','#000');
});

It is that simple.
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Tue 09 Jul 2013, 00:34
What's the difference in what you're suggesting easybb?
You're saying its the #chatbox element the user needs to change, so why use JavaScript for it? I don't get why you've suggested JavaScript to do exactly what the CSS you suggested does.

I've still not looked at the chatbox, so I'm going off of your word that it is the #chatbox element he needs to change. In which case the CSS should work with an important declaration.
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Tue 09 Jul 2013, 00:45
my bad Smile haha I wasn't trying to get the #chatbox that was my mistake.

Code:
[panda=js]avacweb_chat_config.add_event('onload',function() {
avacweb_chat.doc.bgColor="#FF0000";
});

That is what it is Very Happy sorry haha
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Tue 09 Jul 2013, 09:02
Oh right, that's why your confusing me lol. Depending on forum version body.chatbox will work.
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Tue 09 Jul 2013, 20:13
Mr.Easybb wrote:[quotelink="http://www.avacweb.com/t1416p15-change-the-background-of-the-chat#13753"]my bad Smile haha I wasn't trying to get the #chatbox that was my mistake.

Code:
[panda=js]avacweb_chat_config.add_event('onload',function() {
avacweb_chat.doc.bgColor="#FF0000";
});

That is what it is Very Happy sorry haha


It doesn't work... My forum is PunBB
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Tue 09 Jul 2013, 21:52
It doesn't matter the forum version, I am using this now and it works perfectly fine, check your Console for errors. F12 or CTRL+SHIFT+J
LGforumLGforum
Status : Working to restore AWC!

Posts : 2806
Join date : 2011-10-05
Age : 30
Location : UK
Tue 09 Jul 2013, 22:48
Shame, I don't think PunBB gives the chatbox body the 'chatbox' classname.
Change it to:
Code:
[panda=js]avacweb_chat_config.add_event('onload',function() {
    avacweb_chat.doc.body.style.background ="#FF0000";
});
Mr.EasybbMr.Easybb
Status : Love this site, that's why I'm back each day again... lol Samantha's co-owner now. Well deserved!

Posts : 1587
Join date : 2013-01-04
Wed 10 Jul 2013, 00:26
That is strange, since my testing site was punBB and the code I used worked fine lol. Either way whichever works for the OP I suppose.
avatarKrph
Status : No status yet...

Posts : 34
Join date : 2013-06-30
Wed 10 Jul 2013, 09:46
LGforum wrote:[quotelink="http://www.avacweb.com/t1416p15-change-the-background-of-the-chat#13787"]Shame, I don't think PunBB gives the chatbox body the 'chatbox' classname.
Change it to:
Code:
[panda=js]avacweb_chat_config.add_event('onload',function() {
    avacweb_chat.doc.body.style.background ="#FF0000";
});

This code works!! Thanks to LGforum and Mr.Easybb for your help and your patience Very Happy
Sponsored content