Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] Unusual linking problem

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #172155
    lkeeney
    Participant

    Is this code legal?

    I have four images on a page, and I have the title of the image centered beneath the image. I want to link to another page with the same, but larger version of this image when someone clicks on either the image or the name of the title of the image.

    The problem I am having is that I have the hover state color set to green, and all other states set to black.

    When the page is first opened, all of the four titles are blue. Once you hover over any one of them they turn green.

    No where in my code for this whole website do I have any of the link colors set to blue.

    Unfortunately, I can not show a link to the website as I have signed a non-disclosure agreement with this client. However, if necessary I can make a duplicate website and remove all the sensitive content and still show the problem.

    Anyone have any thoughts on this?

    <div>
           <a href="large-images/painting1.shtml">
            <img src="images/spring-470x313.jpg" alt="painting" />
            <div>Promises to Fulfill</div></a>
    </div>
    
    #172156
    Paulie_D
    Member

    Blue is the default color for links (and their contents).

    Are you saying that you have set this to another color

    a {
    color:red /* or whatever */
    }
    

    and these specific links are still blue?

    #172157
    lkeeney
    Participant

    Here is the code I have in the style on the same page:

    The Title does turn green when I hover over either the image or the Title.

    a:link {
    color: #0000;
    }
    
    a:visited {
    color: #0000;
    }
    
    a:hover {
    color: green;
    }
    
    a:active {
    color: #0000;
    }
    

    Am I missing something here?

    #172159
    Paulie_D
    Member

    It’s this

    color: #0000;
    

    It’s a 4 digit hex which is, I think, not accepted / valid

    change to either 3 or 6 digit

    color: #000000;
    color: #000;
    
    #172160
    lkeeney
    Participant

    Thank you.

    I don’t know how many times I looked at that code and didn’t see I had 4 digits there. I even had this code in a separate CSS file and moved it into the page I am working on, and never noticed the extra digit.

    Three digits solved the problem.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.