Hyperlink Colors Do Not Change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • torquehero
    New Member
    • Sep 2006
    • 14

    Hyperlink Colors Do Not Change

    hi,
    I am working with dreamweaver MX 2004. The problem is with Link colors (text). In page properties I have specified the link color, visited links, active links as #000000 and rollover links as #0066cc. Now I click on apply, OK and then I save the file. When I preview it in the browser (IE6), the links are gray..i.e, #666666. The text which does not contain a hyperlink accepts whichever color I set it to. But "the links" are really stubborn. They just dont want to let go that #666666.

    Sometimes when I try to change the color, the font becomes bold and then I just cant undo it. Deleting the text is the only option that remains.

    In the <head> section, it shows the right colors (the ones that I have set)

    a:link {
    color: #000000;
    text-decoration: none;
    }
    a:visited {
    text-decoration: none;
    color: #000000;
    }
    a:hover {
    text-decoration: none;
    color: #0066CC;
    }
    a:active {
    text-decoration: none;
    color: #000000;
    }

    But in the browser it still shows gray. I also deleted all the temp files and cookies and forms, history.. etc etc...
    I even deleted this whole stuff and did it once again rgt from the beginning.. bt in vain. Then I went to the edit style sheet option.. set the colors for that style sheet clicked on "Done".. applied that style to the links bt even then.. The issue persists.
    I have tried it many times and I am really losing my patience now. :D
    PLease somebody help mi... I would really appreciate your help.

    Here's the Link http://web.kbl.co.in/kbl_internet/home_broad.asp


    Thanx :D
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    What you are doing is coloring the 'anchor' but not the text. Put the text inside a <span> and color that.

    Comment

    • torquehero
      New Member
      • Sep 2006
      • 14

      #3
      Originally posted by drhowarddrfine
      What you are doing is coloring the 'anchor' but not the text. Put the text inside a <span> and color that.
      thanx.. bt shouldnt it work out if I have already set that attribute to all the text and links that are there on the page?

      I dont kno how to work it out with <span>, since I have never used it manually. cn u please give me an example? I visited http://www.w3schools.com/tags/tag_span.asp but it wasnt of much use...

      Comment

      • athishay1
        New Member
        • Apr 2007
        • 2

        #4
        Originally posted by torquehero
        thanx.. bt shouldnt it work out if I have already set that attribute to all the text and links that are there on the page?

        I dont kno how to work it out with <span>, since I have never used it manually. cn u please give me an example? I visited http://www.w3schools.com/tags/tag_span.asp but it wasnt of much use...
        its better if you use css/style rather than <span> tag, well here's an example, ive used your style's for links and it is working here...


        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
        <html>
        <head>
        <title>Untitl ed Document</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        <style>
        a:link {
        color: #000000;
        text-decoration: none;
        }
        a:visited {
        text-decoration: none;
        color: #000000;
        }
        a:hover {
        text-decoration: none;
        color: #0066CC;
        }
        a:active {
        text-decoration: none;
        color: #000000;
        }
        </style>
        </head>

        <body>
        <p><a href="#">Link 1
        </a></p>
        <p><a href="#">Link 2</a></p>
        <p> <a href="#">Link 2</a></p>
        <p> <span> <A href="#">Span Link </A></span>

        </p>
        </body>
        </html>


        Hope this will help you.. have a nice time codin...

        Comment

        • torquehero
          New Member
          • Sep 2006
          • 14

          #5
          Originally posted by athishay1
          its better if you use css/style rather than <span> tag, well here's an example, ive used your style's for links and it is working here...


          <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
          <html>
          <head>
          <title>Untitl ed Document</title>
          <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
          <style>
          a:link {
          color: #000000;
          text-decoration: none;
          }
          a:visited {
          text-decoration: none;
          color: #000000;
          }
          a:hover {
          text-decoration: none;
          color: #0066CC;
          }
          a:active {
          text-decoration: none;
          color: #000000;
          }
          </style>
          </head>

          <body>
          <p><a href="#">Link 1
          </a></p>
          <p><a href="#">Link 2</a></p>
          <p> <a href="#">Link 2</a></p>
          <p> <span> <A href="#">Span Link </A></span>

          </p>
          </body>
          </html>


          Hope this will help you.. have a nice time codin...
          Hey, thnx Athishay1... :D ya the code tht u sent is workin fine.. But not when I run it through my Server... It runs well when previewed on a local Computer, but when it is run thru a Server with a proper url,... it goofs up..

          Last night I found out the problem.. I had included a footer.htm in this main .asp and it was the footer's text attributes that were affecting the main .asp's link colors. I still do not know why the footer.htm should affect the main asp file... Anyways...I set the footer file text attributes to what I wanted and VOILA !!!! Issue Resolved... thnx a lot for your time.. u too hv a nice time..

          Regards

          Torquehero

          Comment

          Working...