48 users online (0 members and 48 guests)  


  Results 1 to 8 of 8

Related

  1. My PHP is driving me CRAZY    Forum: PHP Forum
    Replies: 4
  2. Replies: 2
  3. can't get a:hover to work in IE6    Forum: CSS Forum
    Replies: 2
  4. Getting crazy with image uploading    Forum: PHP Forum
    Replies: 1
  1. #1
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426

    a:hover driving me crazy

    http://enigmatics.net

    I set up an external style sheet for this site and defined the following style for a:hover:

    A:hover {
    font-weight : normal;
    font-size : 14px;
    font-family : Verdana;
    font-style: italic;
    color : #0000FF;
    background : transparent;
    text-decoration : underline;
    }

    On the main page of this site, it works fine if the link is going to a HTML page, but if the link is to a PHP script, the link doesn't change color when the cursor is over the link. This has been driving me crazy tonight (not that I had far to go).

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi E. Nice dotcom, btw!

    I am using Mozilla browser, and I found that none of the links had a hover property, or at least none of the ones in table tags. Mozilla 'follows the rules' better than any other browser, which is why I use it. It could be that the links that are working are actually the bug.

    Try

    Code:
    td a:hover {
    }
    or

    Code:
    table a:hover {
    }
    etc. until it starts to behave.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    Thanks, it took me a while to make up the word "enigmatics", lol.

    Here's a page where I took the text out of the table and I'm still only seeing the hover on the HTML links (I'm using IE 5).

    http://enigmatics.net/test.html

    Here's the CSS file that I'm using. Maybe you can see something that I'm missing.

    http://enigmatics.net/enigmatics.txt

    Here's another test page using the CSS file associated with the forum script. Using that CSS file, I see the hover on both the PHP and the HTML links. Maybe I should just use the forum CSS file.

    http://enigmatics.net/test2.html

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    lol. You will love this....

    This took me halfan-hour to find, wierdest thing ever...

    Cut the style rules for A:visited, A:active, A:link and paste them above the rules for a:hover.

    This fixes the problem, at least in IE6 & Mozilla (and Mozilla is very strict) .

    I think the logic of it is that A:link etc all apply to any link, and because they are later in the stylesheet, they get precedence. Now IE6, and Mozilla, gave me 'all or nothing', it either worked for all the links or none at all. I think the behaviour you saw, with the different links, may have been a bug of IE5.

    Try it, hope it works.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    benzden's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Feb 2002
    Location
    San Antonio, Texas
    Posts
    652
    This problem may point out one of the reasons one may not want to go too far in making one's web site more sophisticated that even the browsers can handle -- KISS rules.

  6. #6
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    Thanks, Dean, that almost makes sense, lol. Will try it out later tonight, I hope.

  7. #7
    Enigma's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Nov 2000
    Posts
    426
    Thanks for the help, Dean. My hovers are behaving themselves now.

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Glad its sorted.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread