Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8

Thread: Hover issues

  1. #1
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    I have a hover effect for my links but for some links I want to have this disabled, such as for the images in this gallery.

    I have made a div statement in my main css file to state that the hover effect should be disable but it doesn't seem to work. In the css file I have:

    a:hover { color: #FFFFFF;
    background: #FF0000;
    text-decoration: underline; }

    div.nohover a:hover {color: #FFFFFF;}

    Anyone able to tell me what's going wrong here?

  2.  

  3. #2
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    tried a different way implementing it but no luck...

    a:hover {
    color: #FFFFFF;
    background: #FF0000;
    text-decoration: underline; }

    a:active {
    color: #FFFFFF;
    background: #FF0000;
    text-decoration: underline; }

    .images a:hover {
    color: #FFFFFF;
    text-decoration: underline; }

    .images a:active {
    color: #FFFFFF;
    text-decoration: underline; }

  4. #3
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    You want to change this?:
    Code:
    <td width="200" colspan="1" valign=top align=center class="menu"><a href="/html/gp1.shtml">=></a></td>
    Then use this:
    Code:
    <td width="200" colspan="1" valign=top align=center class="menu"><a class="nohover" href="/html/gp1.shtml">=></a></td>
    And this in your CSS:
    Code:
    .nohover:link, .nohover:hover, .nohover:visited, .nohover:hover:visited { color:#FFF }
    I hope it works

  5. #4
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    I just tried the suggestion and it doesn't work either. Have a look at the code here to see it.

    The area where I want to disable the A refs are the the images. The key area where the problem is apparent is when you click an image. The image opens, you go back to the gallery and the image you clicked on is red and looks crap. That's what I want to address.

  6. #5
    Senior Member teal's Avatar
    Join Date
    Dec 2003
    Posts
    247
    Member #
    4319
    It would seem to me that all you want is to disable the hover effects for certain links, nothing way to complicated. First off, make sure CSS for both of the files is specific, and the one that is a less common occurence is beneath the other. Also, make sure that the CSS addresses ALL elements of the previous hover appropriately . . .
    Code:
    a:link {
    color: #000000;
    text-decoration: none;
    background-color: #FFFFFF;
    }
    a:hover {
    text-decoration: underline;
    }
    
    a.donthover:hover {
    text-decoration: none;
    }
    See what I mean?
    Whoth steps forth to mock the teal? Whom couldst say a color superior!

    Proclamith me, it cannot be done.

  7. #6
    Senior Member
    Join Date
    Dec 2003
    Posts
    1,274
    Member #
    4362
    .nohover:link,
    .nohover:hover,
    .nohover:visited,
    .nohover:active,
    .nohover:hover:visited,
    .nohover:hover:active { background-color:#000000 }

  8. #7
    Senior Member
    Join Date
    Aug 2003
    Location
    Melbourne, Australia
    Posts
    162
    Member #
    2563
    Got it!

    Thanks for both replies, a combination of both was the answer. I used the code from the first reply which got me 3/4 of the way. The key was to ensure I specified all criteria that I wanted to change in the new A refs vs the old ones.

    Thanks folks :-)

  9. #8
    Senior Member teal's Avatar
    Join Date
    Dec 2003
    Posts
    247
    Member #
    4319
    Most common mistake. No problemo
    Whoth steps forth to mock the teal? Whom couldst say a color superior!

    Proclamith me, it cannot be done.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:55 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com