WordPress.org

Support

Support » Themes and Templates » Pinboard » CSS code for button hover not working

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/
    Thanks for your time

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

    @esmi

    Forum Moderator

    Are you using a child theme?

    No, I’m entering the code in the custom CSS section that’s built into the theme. Its in the Layout section.

    esmi

    @esmi

    Forum Moderator

    Try using Firefox with the Firebug add-on to pin down the CSS you need to amend. Or use whatever developer tool is available in your web browser.

    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.
Skip to toolbar