If you understood the difference between HTML and CSS, you would not say "pure CSS/HTML" like that.
When a user goes away, the class "away" is added to two places, but they are not high enough up the DOM for you to be able to change the chat background with CSS.
If you have an AFK button or an /afk command, then you are already using some javascript to achieve that, so you can just edit your script to change the chat background in that.
To set the background in your "go away" function:
$("body").css("background-image","url(http://FULLIMAGEURL)");
To unset the background in your "go back" function:
$("body").css("background-image","");
Editing because this is not worth making a new comment:
Using "pure CSS/HTML" is something that you can do if you're editing an article or a template - or making your own website. It is not something that you can do when you're referring to altering other areas on Wikia.
It is impossible for a Wikia user to use "a combination of CSS/HTML" without JS to alter the Chat.
Stylesheets do not contain any HTML. They contain CSS only. For instance: User:KeeblerPie/global.css is invalid - If you understood the difference between HTML and CSS, you would not have added HTML to a CSS page like that.