« Web, HTML, Tech Forum

Custom online/offline icon?

Is there a way to change that and if so how?Β 


Report Topic

7 Replies

Sort Replies:

Reply by Arron J. Hunt

posted
updated

Should be pretty easy to do.


<style>
/* Hides the default image */
.online img,
.offline img {
Β  display: none;
}
.online::before {
Β  content: "πŸ€™";
}
.offline::before {
Β  content: "πŸ’€";
}
</style>

or for images:

<style>
.online::before {
Β  content: "";
Β  display: block;
Β  width: 24px;
Β  height: 24px;
Β  background-image: url("path-to-image.png");
Β  background-size: 24px 24px;
}
</style>


Permalink Report Reply

Reply by Rosy

posted

Dont know if it helped the original poster but it helped me, thank you!


Permalink Report Reply

Reply by PastelMermaid

posted

Gonna try my hand at this!

Thanks. .u.


Permalink Report Reply

Reply by haihai

posted

<style>
.online{Β 
/*hides the text*/
visibility: hidden;Β 
}Β 
.online img {
/*changes the content of the image*/
content: url("your image here :>");Β 
animation-name: none;Β 
/*makes sure you can see it :)*/
visibility: visible;Β 
/*set the width and height to the dimensions that you want
if you want it to stay to scale, just get rid of either the width
or the height and it will scale it proportionally*/
height: 25px;Β 
width: 80px;Β 
}
</style>


Permalink Report Reply

Reply by cj hayward

posted

hey! i posted a blog tutorial for this :) check my profile!


Permalink Report Reply

Reply by π’Ύπ“π“π“Ž ✰

posted

none of these codes in the replies actually help with the offline message/icon.

Yes, we've changed the online icon, but how do we successfully change the offline/last active icon/message?


Permalink Report Reply

how do we do an offline image???


Permalink Report Reply