55 users online (1 members and 54 guests)  


  Results 1 to 3 of 3

Related

  1. Hover command on a td    Forum: CSS Forum
    Replies: 3
  2. Help with an inline a:hover    Forum: CSS Forum
    Replies: 1
  3. hover on links and pics    Forum: HTML Forum
    Replies: 5
  4. a:hover driving me crazy    Forum: CSS Forum
    Replies: 7
  5. Hover text    Forum: Website Scripts Forum
    Replies: 1
  1. #1
    herbie04's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    1

    can't get a:hover to work in IE6

    I'm relatively new to CSS and am trying to get a:hover to work in IE6. Before I post my code here is the situation:

    I'm trying to have a "box" that contains an image and a description below the image. The box is showing up fine. However, I've set an a:hover so that a thin red border should appear around the image when pointed to. It works just fine in Firefox but nothing shows up in IE6 when the image is moused-over.

    Here is the code:

    Code:
    <html>
    <head>
    <style type="text/css">
    div.img
    {
      
      margin: 2px;
      border: 1px solid #ff0000;
      height: auto;
      width: auto;
      float: left;
      text-align: center;
      
    }    
    div.img img
    {
      display: inline;
      margin: 5px;
      border: 1px solid #ffffff;
    }
    div.img a:hover img 
    {
    border: 1px solid #ff0000;
    
    }
    div.desc
    {
      text-align: center;
      font-weight: normal;
      
      margin: 2px;
    }
    </style>
    </head>
    <body>
    
    <div class="img">
     <a target="_blank" href="klematis_big.htm"><img src="go blackshirts.jpg" alt="Klematis" /></a>
     <div class="desc">Add a description of the image here</div>
    </div>
    
    
    </body>
    </html>
    Any help would be greatly appreciated!
    Last edited by vinyl-junkie; 05-17-2007 at 10:10 PM. Reason: Added code tags

  2. #2
    vinyl-junkie's Avatar
    Moderator

    Status
    Offline
    Join Date
    Sep 2005
    Posts
    721

    Re: can't get a:hover to work in IE6

    I don't have IE6 to test with. Sorry. What I would suggest though is to make sure your page validates. If it does, you're more likely to have your code work in multiple browsers.

    Hope this helps.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more

  3. #3
    sushmant's Avatar
    New User

    Status
    Offline
    Join Date
    May 2007
    Posts
    4

    Re: can't get a:hover to work in IE6

    I have read somewhere that, its not possible to use hover function alone. So include link, visited,active along with hover function. You have told that for box(may be image) its not changing color to red. Just try this. Set box's border color to red. It may work. But I am not sure...
    a:link { color: #000000; background-color: transparent; text-decoration: underline}
    a:visited { color: #000000; background-color: transparent; text-decoration: underline}
    a:active { color: #000000; background-color: transparent; text-decoration: none }a:hover {border-color: red}



Tags for this Thread