2 Replies Latest reply on Feb 10, 2010 8:29 AM by Hobie 17

    Link colors

    Hobie 17

      I have a set of links within a div. I want these link a different color than the pseudo-class. How do you do this. I thought I had it work out  . . . did not work.

       

      Thank you for any help you give.

        • 1. Re: Link colors
          osgood_ Level 8

          Hobie 17 wrote:

           

          I have a set of links within a div. I want these link a different color than the pseudo-class. How do you do this. I thought I had it work out  . . . did not work.

           

          Thank you for any help you give.

           

          You can 'target' a specific set of links on a page within  a <div> if it has an 'id' or 'class' associated with it.

           

          Example, the <div> below has an 'id' of 'contents'

           

          <div id="contents">

          <a href="#">Chelsea</a>

          <a href="#"> Man Utd</a>

          <a href="#">Arsenal</a>

          </div>

           

           

          To target the links within the 'contents' <div> use some css:

           

          Sets the links:

           

          #contents a {

          color: #f60;

          }

           

          Sets the hover:

           

          #contents a:hover {

          color: #309;

          }

          • 2. Re: Link colors
            Hobie 17 Level 1

            Thanks!