You are viewing limited content. For full access, please sign in.

Question

Question

change color on even/odd blocks in a collection

asked on September 1, 2016 Show version history

I have a collection:

that I would like to have the background color to be light grey for even blocks and light yellow for odd blocks. This collection gets values from field lookup and user additions.

How do I do this? 

0 0

Answer

SELECTED ANSWER
replied on September 2, 2016

Easy enough with CSS:

.cf-collection .form-q:nth-child(odd) li{
    background-color: grey;
}
.cf-collection .form-q:nth-child(even) li{
    background-color: yellow;
}

 

2 0
replied on September 2, 2016

Excellent!  Thanks.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.