Title: CSS code for button hover not working
Last modified: August 20, 2016

---

# CSS code for button hover not working

 *  [BingoPajama](https://wordpress.org/support/users/bingopajama/)
 * (@bingopajama)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/)
 * Hi there.
 * I’m having a problem with some CSS code. The code is meant to make the hover 
   colours on the main menu alternate. But so far, it hasn’t worked as expected.
 * The first section works fine:
 * #access li a:hover
 * {
    background-color:yellow; }
 * …but this next piece of code has zero effect.
 * #access li a:hover:first-child:hover {
    background-color:red; }
 * #access li a:hover:nth-child:hover {
    background-color:green; }
 * #access li a:hover:nth-child:hover {
    background-color:yellow; }
 * …I’ve tried some variations of it, all to no avail.
 * If anybody could tell me what I’m doing wrong I’d be most grateful :).
 * I’m relatively new to programming CSS. I still don’t have a clear model of the
   interplay between the page, HTML and the style sheet.
 * I can usually hack something together from what I know and from what I can glean
   from online sources around the web and friends.
 * If someone could string together some code that does what I want it to and explain
   it for me, that would be superb.
 * The site is here – [http://wildhoneysoundsystem.co.uk/](http://wildhoneysoundsystem.co.uk/)
   
   Thanks for your time

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/#post-3463168)
 * Are you using a child theme?
 *  Thread Starter [BingoPajama](https://wordpress.org/support/users/bingopajama/)
 * (@bingopajama)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/#post-3463172)
 * No, I’m entering the code in the custom CSS section that’s built into the theme.
   Its in the Layout section.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/#post-3463362)
 * Try using Firefox with the [Firebug add-on](http://getfirebug.com/) to pin down
   the CSS you need to amend. Or use whatever developer tool is available in your
   web browser.
 *  Thread Starter [BingoPajama](https://wordpress.org/support/users/bingopajama/)
 * (@bingopajama)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/#post-3463372)
 * I used Chrome to do exactly that. I thought I HAD pinned it down… and to some
   extent, I did: the first section works fine. The second, the bit that I really
   needed to function, didn’t.
 * I think its my understanding of CSS and how it fits into the architecture of 
   the theme that’s lacking. I hoped that somebody may be able to tell me where 
   I’ve gone wrong.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘CSS code for button hover not working’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/pinboard/1.1.12/screenshot.png)
 * Pinboard
 * [Support Threads](https://wordpress.org/support/theme/pinboard/)
 * [Active Topics](https://wordpress.org/support/theme/pinboard/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/pinboard/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/pinboard/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [Pinboard theme](https://wordpress.org/support/topic-tag/pinboard-theme/)

 * 4 replies
 * 2 participants
 * Last reply from: [BingoPajama](https://wordpress.org/support/users/bingopajama/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/css-code-for-button-hover-not-working/#post-3463372)
 * Status: not resolved