WordPress.org

Ready to get started?Download WordPress

Forums

hover CSS problem (6 posts)

  1. skallerup
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. mar1965
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

    Hi,

    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