Alternate text line color

Support area for phpBB's mChat extension
Post Reply
mastnacek
Donor
Posts: 24
Joined: 10 Dec 2018, 19:48

Alternate text line color

#1

Post by mastnacek » 11 Dec 2018, 09:29

Can I set the color of rows alternately?
:beer:

mastnacek
Donor
Posts: 24
Joined: 10 Dec 2018, 19:48

Re: Alternate text line color

#2

Post by mastnacek » 11 Dec 2018, 10:37

I found this solution on dmzx page, but dont work in lates version mCHat
div.mChatBG1 {
background: #2A2A2A;
border: 1px solid #000000;
-webkit-border-radius: 6px;
-o-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
padding: 5px;
color: #FFFFFF;
margin-right: 1px;
overflow: hidden;
}

div.mChatBG1:hover {
background: #373737;
}

div.mChatBG2 {
background: #2A2A2A;
border: 1px solid #000000;
-webkit-border-radius: 6px;
-o-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
padding: 5px;
color: #FFFFFF;
margin-right: 1px;
text-align: left;
overflow: hidden;
}

User avatar
kasimi
mChat developer
Posts: 887
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Alternate text line color

#3

Post by kasimi » 11 Dec 2018, 22:15

This should work:

Code: Select all

.mchat-message:nth-child(even) {
    background: #366135;
}

.mchat-message:nth-child(odd) {
    background: #409163;
}

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest