Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: hover display

  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts

    hover display

    Should this work ? All OK until I add red line, then even changing color does not work anymore, and of course it does not become hidden.

    Code:
    .class
    {
      display:inline;
      color:blue;
    }
    
    .class:hover
    {
      color:red;
      display:none;
    }
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search

  • #2
    Regular Coder
    Join Date
    Aug 2011
    Location
    U.S.A.
    Posts
    233
    Thanks
    2
    Thanked 48 Times in 48 Posts
    When I tested it, it worked, but not as you'd expect. when you turn off the display property (display:none), it can no longer be seen. Therefore you would not be "hovering" over it anymore, so that css call would no longer apply and the original would. However, once it comes back, you are now hovering over it, so the hover pseudo class goes into effect.

    Why are you wanting to hide an item on hover? because it will come right back when you "display: none" it, because then you're not hovering over it anymore.
    WordPress Designer and theme developer. KlongDesigns - helping bloggers and non-technical folks claim their space on the internet.

  • Users who have thanked resdog for this post:

    BubikolRamios (11-22-2011)

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    Aha, hence flickernig moving mouse over it.

    Thanks.
    Found a flower or bug and don't know what it is ?
    agrozoo.net galery
    if you don't spot search button at once, there is search form:
    agrozoo.net galery search


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •