4 Replies Latest reply on Jul 30, 2008 3:22 AM by Newsgroup_User

    Link colours, help!

    Mike@Hunter
      Hi there,

      I hope you can help me. I've set the link, visited, rollover and active colour for my page to be #cd2027, which is my standard link colour. However further down the page I want the link and visited colour to be #999999 and the rollover and active to be #cd2027, but I can't seem to change this without it changing for the whole page. Can you change only small selections of text to have different link colouration to the page default, and if so, how do you do it?

      Thanks in advance
      Mike
        • 1. Re: Link colours, help!
          Level 7
          On Wed, 30 Jul 2008 09:34:43 +0000 (UTC), "Mike@Hunter"
          <webforumsuser@macromedia.com> wrote:

          >Hi there,
          >
          > I hope you can help me. I've set the link, visited, rollover and active colour
          >for my page to be #cd2027, which is my standard link colour. However further
          >down the page I want the link and visited colour to be #999999 and the rollover
          >and active to be #cd2027, but I can't seem to change this without it changing
          >for the whole page. Can you change only small selections of text to have
          >different link colouration to the page default, and if so, how do you do it?
          >
          > Thanks in advance
          > Mike

          just define another set of pseudo codes but within a descendant class
          selector

          ( the colours aren't suggested - I just typed the first colours to
          come into my head !!! :-)

          css
          a { font-size:1.0em; font-weight:normal; font-style:italic; }
          a:link { color:blue; }
          a:visited { color:purple; }
          a:focus { color:orange; }
          a:hover { color:red; }
          a:active { color:navy; }

          .altLink a:link { color:pink; }
          .altLink a:visited { color:yellow; }
          .altLink a:focus { color:blue; }
          .altLink a:hover { color:green; }
          .altLink a:active { color:silver; }

          html
          <div class="altLink">


          </div>
          --

          ~Malcolm~*...
          ~*
          • 2. Re: Link colours, help!
            Level 7
            Are you using Page Properties or CSS (style sheets)?

            CSS is the only way to do this using pseudo-classes:

            http://www.projectseven.com/tutorials/css/pseudoclasses/index.htm

            --
            Regards

            John Waller
            • 3. Re: Link colours, help!
              Mike@Hunter Level 1
              Malcolm, you are my hero. Thanks for explaining so clearly. Also cheers John for the link, I knew nothing about pseudo classes before now - I can write HTML but I'm pretty new to all this Dreamweaver, CSS jazz.

              Thanks!
              • 4. Re: Link colours, help!
                Level 7
                On Wed, 30 Jul 2008 10:12:15 +0000 (UTC), "Mike@Hunter"
                <webforumsuser@macromedia.com> wrote:

                >Malcolm, you are my hero. Thanks for explaining so clearly. Also cheers John
                >for the link, I knew nothing about pseudo classes before now - I can write HTML
                >but I'm pretty new to all this Dreamweaver, CSS jazz.
                >
                > Thanks!

                No problem

                also if you want a web page to have different link styles

                give the page an id in the body tag:

                <body id="special">

                and put this in the style sheet

                #special a:link { color:pink; }
                #special a:visited { color:yellow; }
                #special a:focus { color:blue; }
                #special a:hover { color:green; }
                #special a:active { color:silver; }
                --

                ~Malcolm~*...
                ~*