AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Solved] Alternating post background colors

6 Posts
2 Users
4 Reactions
1,314 Views
Posts: 23
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jw0068)
Eminent Member
Joined: 2 years ago
[#51281]

Hi, I'd like to provide some contrast between posts within a thread. I am using the extended layout, and every post within a thread currently has a white background. Is it possible to make it so that the background color of every other post is a different color to provide a bit of contrast?

 

TIA!


5 Replies
Tutrix
Posts: 1519
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tutrix)
Noble Member
Joined: 6 years ago

Hi @jw0068 

you can format this with CSS
for example

#wpforo #wpforo-wrap .wpfl-1 .post-wrap.wpfp-first .wpforo-post,
#wpforo #wpforo-wrap .wpfl-1 .post-wrap:nth-of-type(2n) .wpforo-post{background: #f5f5f5 !important;}
#wpforo #wpforo-wrap .wpfl-1 .post-wrap.wpfp-first .wpforo-post .wpf-left,
#wpforo #wpforo-wrap .wpfl-1 .post-wrap:nth-of-type(2n) .wpforo-post .wpf-left{background: #ffffff !important;}

add it to custom css
Dashboard > wpForo > Settings > Colors & Styles > Custom CSS


1 Reply
(@jw0068)
Joined: 2 years ago

Eminent Member
Posts: 23
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@tutrix this worked perfectly. Thank you so much!!


Posts: 23
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@jw0068)
Eminent Member
Joined: 2 years ago

I tried myself, but couldn't figure it out...is there a way to tweak the CSS so that the left area (profile info) for each post matches the background of the post? 

The code you provided has it so that white background posts have gray sidebars, and vice versa. Can it be so that they match? Gray with a gray post, white with a white?

 

Thanks again!


2 Replies
Tutrix
(@tutrix)
Joined: 6 years ago

Noble Member
Posts: 1519
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@jw0068 

#wpforo #wpforo-wrap .wpfl-1 .post-wrap.wpfp-first .wpforo-post .wpf-left,
#wpforo #wpforo-wrap .wpfl-1 .post-wrap .wpforo-post .wpf-left{background: #ffffff !important;}
#wpforo #wpforo-wrap .wpfl-1 .post-wrap.wpfp-first .wpforo-post,
#wpforo #wpforo-wrap .wpfl-1 .post-wrap:nth-of-type(2n) .wpforo-post{background: #f5f5f5 !important;}
#wpforo #wpforo-wrap .wpfl-1 .post-wrap.wpfp-first .wpforo-post .wpf-left,
#wpforo #wpforo-wrap .wpfl-1 .post-wrap:nth-of-type(2n) .wpforo-post .wpf-left{background: #f5f5f5 !important;}

(@jw0068)
Joined: 2 years ago

Eminent Member
Posts: 23
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@tutrix absolutely fantastic...and I was way off in my attempts 🙂 

Thank you so much!


Share: