hover CSS problem (6 posts)

  1. skallerup
    Posted 3 years ago #

    Somehow I can't find out how to get my menu to change color when the mouse is over(hover)?
    Looks like my css is getting overruled by some other code maybe?
    right now the hover is black like the background.

    my link

  2. mar1965
    Posted 3 years ago #

    From my end, the hover seems to be working fine! Forside is Yellow, Om os has same color as your page border, Job is Green, and Kontakt is grape/purple. I am using Safari as my browser, but have also tested it with Google Chrome. Upon first hovering over the menu items, it takes a few seconds, but that is only after initially loading the page.

  3. skallerup
    Posted 3 years ago #

    it the menu "virksomhed, offentlig, uddannelse, ngo" that I need to get white when mouse is over their names :)

  4. mar1965
    Posted 3 years ago #

    Oops! Well in your CSS, I see the following:

    #top-menu a {color:#000; text-decoration: underline;}
    #top-menu a:hover {color:#000; text-decoration: underline;}
    a { text-decoration: none; color: #00b7f3;}
    a:hover { text-decoration: underline; color:#fff;  }

    You would need to make the change to the color in #top-menu a:hover.

  5. skallerup
    Posted 3 years ago #

    I've changed that, but it's the same.

    the page has it's own rules because i made this rule:

    <body<?php if ( is_page('gratis-ide')) {echo ' class="gratiside" '; } ?>>

    so the css is:

    .gratiside #top-menu a{ padding: 0 10px; }
    .gratiside #top-menu a:hover{  color:#fff;}

    now it has no rule suddenly?

  6. mar1965
    Posted 3 years ago #


    When I look at the rendered HTML code, I see several <body> tags, one of which is assigned the class 'gratiside', another one with the class 'gratis-ide', and another one with an array of classes 'page page-id-52 page-child etc...'

    Somehow, there is something else causing this to break. Have you had a chance to look at the article Dynamic Menu Highlighting?

Topic Closed

This topic has been closed to new replies.

About this Topic