Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #410805

    Hi,
    I have a small logo and beside a textlabel in my Header.
    Now I want, that the logo and the Label is changing the Color onMouseover.

    With the text exerything work fine, but when I said my logo should disapper and in the Background my colored logo should apper, my text moved away.
    How could I solve this?

    
    .logo:hover img {  
        opacity: 0;  
    }  
    
    .logo:hover {  
        background-image: url(https://...//Logo_dgruen_56x40.png);  
        background-size: 40px 30px;  
        background-repeat: no-repeat;  
        top: 14px;  
    }  
    
    #411099

    Hi sunshineh!

    Please change your second code to following one

    .logo:hover {
      background-image: url(EDITED);
      background-size: 40px 30px;
      background-repeat: no-repeat;
      background-position: 0% 50%;
    }

    Regards,
    Yigit

    #411463

    Thanks Yigit,
    please can you have a short look at the side again.
    What can I improve, so that the color changing? I think there is already something wrong.
    (please can you remove my URL in your post)

    #411799

    Hi!

    I think it’s better if you hide the actual logo image then set initial logo as background like the hover state:

    .logo a img { opacity: 0; }
    
    .logo {
      background-image: url(INITIAL LOGO HERE);
      background-size: 40px 30px;
      background-repeat: no-repeat;
      background-position: 0% 50%;
    }

    Regards,
    Ismael

    #415828

    Thanks, it works great!

    #416232

    Hi!

    Great, glad we could help :)

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.