1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 Threads color

Discussion in 'Styling and Customization Questions' started by Tony008, Nov 16, 2014.

  1. Tony008

    Tony008 Member

    Hello Everyone.
    Am new in Xenforo and am not so familiar with the software.

    Id like to have the first and the third thread one color and the second and forth thread different color:

    [​IMG]

    Also id like to make this on the thread inside:

    [​IMG]

    THANK YOU!!!
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

  3. Tony008

    Tony008 Member

    Thank you! I have changed the posts but cant find for threads.

    I have tried this but wont work:

    .thread:nth-child(even) {
    background-color: #F7F7F7;
    }
     
  4. Tony008

    Tony008 Member

    Am trying two hours and cant figure it out. Please help me.
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    The class you would need to use is discussionListItem .

    I doubt it is possible for threads though as they aren't in sequential order so won't be odd-even-odd.
     
  6. Tony008

    Tony008 Member

    Thank you Brogan for the answer.

    I have added this:
    .discussionListItem
    {
    background-color:#141414;
    }

    WONT WORK :(
     
    Last edited: Nov 16, 2014
  7. TJA

    TJA Well-Known Member

    In EXTRA.css try

    .discussionListItem:nth-child(odd) {background-color: #000000;}
     
  8. Tony008

    Tony008 Member

    @thejackarmy thank you for the help but its not working :(

    Any other idea?
     
  9. TJA

    TJA Well-Known Member

    Definitely works. Are you adding the code to your EXTRA.css?

    Code:
    .discussionListItem:nth-child(even) {
    background-color: #f0f7fc;
    }
    upload_2014-11-17_12-21-15.png

    Code:
    .discussionListItem:nth-child(odd) {
    background-color: #f0f7fc;
    }
    upload_2014-11-17_12-22-55.png
     
  10. TJA

    TJA Well-Known Member

    And if you want the stats column to follow suite add this to EXTRA.css

    Code:
    .discussionListItem .stats {
    background: none !important;
    }
    upload_2014-11-17_12-36-24.png
     
  11. TJA

    TJA Well-Known Member

    If you are using a custom style you may need to add !important

    .discussionListItem:nth-child(odd) {
    background-color: #f0f7fc !important;
    }
     
    Tony008 likes this.
  12. Tony008

    Tony008 Member

    Thejackarmy posted the right solution thank you!

    If someone have added another color for the threed the color of the sticky will change also.... So you have to add this so you can have different color for the sticky:

    .sticky:nth-child(even) {
    background-color: #FCFFDA !important;
    border: 1px solid #F39D00 !important;
    }
     

Share This Page