Results 1 to 7 of 7

Thread: IE 6 Hover Display

  1. #1
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    266
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default IE 6 Hover Display

    I have been trying lots of things to get IE 6 to display a different background color when the on mouse over, but have been unsuccessful. Does anyone know how I can get the effect of .divname:hover { to work in IE 6?
    Thanks DD, you saved me countless times

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    From glancing at posts as they've gone by, I believe that the pseudoclass :hover is only acceptable for wide use with <a> tags (links). Some browsers allow for other uses, but IE doesn't, I think.
    You could do it with a mouseover.
    <div onMouseover="this.bgcolor='#000000'"> (black)
    Random guess, and likely won't work, but that general idea should point you in the right direction.
    Hope this helps. For a more thorough answer, see what someone else suggests.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    266
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by djr33 View Post
    From glancing at posts as they've gone by, I believe that the pseudoclass :hover is only acceptable for wide use with <a> tags (links). Some browsers allow for other uses, but IE doesn't, I think.
    You could do it with a mouseover.
    <div onMouseover="this.bgcolor='#000000'"> (black)
    Random guess, and likely won't work, but that general idea should point you in the right direction.
    Hope this helps. For a more thorough answer, see what someone else suggests.
    It didn't work, which I guess you were expecting . But I may have done it wrong, am i supposed to put this.bgcolor or put something in the place of "this"?
    Thanks DD, you saved me countless times

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    "this.value" is the value of the a field in a form. Likewise, it applies to other things.
    this is the shortcut command for not naming the object. Apparently, divs don't work like this (assuming there isn't something different that isn't allowing the code to work).
    Additionally, onMouseover may not apply exactly that way for divs.
    Really, I can't tell you exactly what to do.
    I would look up onMouseover properties of a <div>, as well as a function that changes the background of a named or certain-class div.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by djr33
    I would look up onMouseover properties of a <div>, as well as a function that changes the background of a named or certain-class div.
    Or you could use Javascript to change the style of the div. I had a working script that did this a while back, but lost it somehow.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Aug 2006
    Location
    Ohio
    Posts
    266
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I ended up using javascript, I didn't even think of it before.
    PHP Code:
    <div class="button" onmouseover="this.className='buttonHover'" onmouseout="this.className='button'"
    works great.
    I have another question that I noticed while doing this, if you look at http://echo-designes.com in IE 6, on the left, it takes the last word of "Visit Site" from above it and displays it again. If you look at the code, it is not in there at all. I set the overflow for that div to hidden and everything, but yet it still shows up. Any idea why?
    Thanks DD, you saved me countless times

  7. #7
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Ah. See? Easy. I knew it would be a simple solution... glad it works.

    Sorry I couldn't be of more help.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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