Homepage Panes – Alternating Background Colours
-
Hi there,
I’m just wondering if there might be a way to achieve alternate background colours and borders for the homepage panes?
At the moment I’ve got all yellow backgrounds and orange borders. Would it be possible, do you think, to have one yellow background, one green background, one yellow background etc?
I’ve found lots of instruction online about how to have alternating background for comments, but since it’s all php, I’m not certain how to map it across. I thought I might be lucky in trying nth-child(), but that didn’t work either.
Grateful for any help.
Regards,
Sharon
Mod.homepage-pane:nth-child(2) {style elements;}
didn’t work?Hi Kenneth,
No, I wasn’t able to get that to work. I tried:
.homepage-pane:nth-child(2) {background: #ff0000;}
and variations of the above for borders, but no joy. Tried !important on the end of everything, and also swapped (2) for (even) and (odd), just to have a play about. Also gave (2n+0) and (3n+0) a try, just to see if anything would change….
Cheers,
Sharon
P.S. I’m hoping my favourite go-to-blog for Graphene returns soon. Feel like my left arm’s been severed….. 🙂
ModWeird, because that worked in Firebug. But that’s no guarantee.
Quote:I’ve found lots of instruction online about how to have alternating background for comments, but since it’s all php, I’m not certain how to map it across.Got any links for this? I’ll see if I can figure out a more user friendly approach. (I’m in the mood for some PHP challenges right now!)
Quote:P.S. I’m hoping my favourite go-to-blog for Graphene returns soon. Feel like my left arm’s been severed….. 🙂Huh?
Personally, I’m waiting for these:
http://juiceandsmoothierecipes.com/category/juice-recipes/apricot-juice-recipes/
I love apricots. They’re one of my favorite fruits!
Kenneth,
Here are some links I came across during my research this morning:
http://wordpress.org/support/topic/how-to-alternate-background-colors-of-comments-posted-on-blog
http://www.artisteer.com/?post_id=180282&p=forum_post&forum_id=13
Some are for comments and some are for post backgrounds. I was hoping I’d understand enough to map them across to homepage panes, but I’m not that au fait with php (yet!).
Also, I’ve not been able to log onto blog.kjodle for about two weeks. Every time I try though a bookmark, or even through the link on your sig here, I get this error message:
“Not Found
The requested URL /category/computers/wordpress-help/ was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”
When I try to just go to the home page, I get a Dreamhost landing page telling me that “blog.kjodle.net is almost here!”.
I wish now I had mentioned it to you sooner, I assumed you were changing hosting companies…..
I did not have fun with my text widgets 😉
I’ll make a point of doing some apricot juices for you over the next few days. 🙂
ModOkay, I was overthinking this.
If you poke around with Firebug, you’ll notice that Graphene alternately assigns the classes
.alpha
and.omega
to the homepage panes. So it’s just a matter of adding something like this to your stylesheet:.homepage_panes .alpha {
background: #fff;
color: #000;
}
.homepage_panes .omega {
background: #000;
color: #fff;
}I still haven’t figured out how to make each one different. That will probably require some javascript or jQuery.
Quote:Also, I’ve not been able to log onto blog.kjodle for about two weeksI was reconfiguring my server and took down some subdomains and forgot to put that one back up. Thanks for the heads-up. I’m glad you find it useful. (I’m way behind in posting, apparently.)
Brilliant!! I completely missed that. Thanks so much. Yet again 🙂
Quote:I’m glad you find it usefulUseful doesn’t even begin to describe the help resourses you’ve got up there, mate. When I first started, I had yours open in one tab consistently, and google open in the other. Blog Odle was always my first go-to. I’m very grateful to have had that, as well as Prasanna’s website, at my fingertips. 🙂
Viewing 7 posts - 1 through 7 (of 7 total)
- You must be logged in to reply to this topic.