Hi all,

Here's an easy tip to take advantage again of CSS3 capabilities. With the nth-child(n) pseudo selector, you can customize your forum index or topic list by giving it an alternating background color effect.

Add this code to your Design Studio CSS box:

All Forum Index/Discussion List

.categories tbody tr:nth-child(odd) { background-color:#fff; }
.categories tbody tr:nth-child(even) { background-color:#e9eee8; }

 

Home page module forum list

.module_forum .vcard:nth-child(odd) { background-color:#fff; }
.module_forum .vcard:nth-child(even) { background-color:#e9eee8; }


More Options

Blog module list (contributed by Jane Noel)

.xg_blog .xg_module_body:nth-child(odd) { background-color:#fff; }
.xg_blog .xg_module_body:nth-child(even) { background-color:#e9eee8; }

Home page blog module list

.module_blog .vcard:nth-child(odd) { background-color:#fff; }
.module_blog .vcard:nth-child(even) { background-color:#e9eee8; }

 

Make sure to change the background color values that will match your theme or to any value you like. I have downloaded and applied this style to a local static html copy of this forum for a good sampling and demo/screenshot below. Similar to the 'Top This Week' box and pretty much straightforward on what the code will do.

The code also applies to featured discussions and group discussion list.

Add your own additional styles and enjoy!

Tags: alternate, background, css, forum, row color

Views: 957

Reply to This

Replies to This Discussion

Very nice tip...thanks a lot. will this apply to Main page forum module too?

Hey Bernard, you're welcome. Yes, just updated it :-)

cheers.

BTW, thanks again.

No problem. hey, I just updated the tip with your request-- it should work on the home page.

It works like a charm. Thanks a lot.

great, cheers.

Excellent tip Ron!

Thanks Michael.

Will this work in the old appearance editor?  (and where's the FAVORITE button so I can keep track of this discussion??  The only ones we can favorite are the ones on the main page...the featured discussions.  We need this ability for ALL discussions.)

Hi Diane,

I'm not sure but I think it will also work.

Great tip Ron. Thanks for sharing :)

You're welcome Fire-Tech. glad you like it.

RSS

Latest Activity

Riccardo Rossini replied to Riccardo Rossini's discussion 'problem in redirecting NING 3.0'
2 hours ago
Mandy P. replied to Mandy P.'s discussion 'Remove unwanted space-Header'
"thanks a bunch..that helps!"
3 hours ago
Aaron replied to Aaron's discussion 'Ning Spring Cleaning Begins This Week'
"Hi everyone, Just a quick note to let you know that this spam cleanup is complete. That said, you…"
5 hours ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Check it out. I hovered both images, made 2 screen shots (just to capture the hover tip) and placed…"
5 hours ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"I'm thinking it has something to do with caching. I just inspected the header, and I see 2…"
5 hours ago

NC for Hire
Jen replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Fire-Tech, You guys have given me major relief, just to know it's not something unique on my…"
5 hours ago
Fire-Tech replied to Jen's discussion 'Jen's Running List - Updated 4/6/2013' in the group The Sandbox
"Same thing here. All of the same issues...in FF and Chrome, but not as bad in Chrome."
7 hours ago
Kos replied to Kos's discussion '3.0 My Thoughts From A Non-Coder (edited 5/20/13)' in the group The Sandbox
"Edited to add a menu layer suggestion [used the Galaxy SIII]"
7 hours ago

© 2013   Created by Ning.

Badges  |  Report an Issue  |  Terms of Service