4 Replies Latest reply on Feb 23, 2010 11:21 PM by onefiftymph

    How to have 2 link colors on one page?

    onefiftymph Level 1

      Learning CSS and am unable to make this happen. What am I doing wrong?

       

       

      http://larrysullivandesign.com/sourceprintmedia.com/_contact.html

       

      http://larrysullivandesign.com/sourceprintmedia.com/sourceprintmedia.css

       

       

      The text links at page bottom (link-typeA) load up blue, even though the stylesheet calls for them to be gray (#E8E8E8), so they'll read on dark background.

       

      I want blue links site-wide, and grey at page bottom, only for link-typeA

       

      I want only one style sheet, if possible.

       

      How do I make all the link stage (active,hover, etc) colors apply to just link-typeA ? Only way I can see is in Page Properties, which makes one single embedded style on each page. confused....

       

       

      thanks!

        • 1. Re: How to have 2 link colors on one page?
          ottz0 Level 1

          Set your styles for your a link. this will set these attributes for all your links on the page eg:

           

          a{color:#D28A05; text-decoration:none;}
          a:hover {color:#fff; text-decoration:underline;}

           

          then make a new div called footer and assign link attributes to the footer using a class

          <div class="footer">this is the footer</div>

           

          .footer a{
          color:#000;
          }
          .footer a:hover{
          color:#D28A05;
          }

          1 person found this helpful
          • 2. Re: How to have 2 link colors on one page?
            onefiftymph Level 1

            Thanks for the reply.

             

            Where exactly does this div go? In the style sheet or in the body of each page? Is there an interface/dialog box for assigning link attributes to this footer, or do I have to type it in the code manually?

            • 3. Re: How to have 2 link colors on one page?
              ottz0 Level 1

              The divs are always referenced in the body and then you assign a class to that div. You can also asign a class to a table if you are using tables.

               

              First make a refernce to an external style sheet and place all your css in there.

               

              make your page and then assign the classes to the divs or tables.

               

              If you think of a div as a container then you assign a class of (footer) to the container. The reference then looks to the external style sheet of where to find that class and then finds the .footer and assigns the correct attributes to it such as the .footer a:link{color:#000;}

               

              you can also see the styles and assign them without handcoding by going to window/CSS styles

              1 person found this helpful
              • 4. Re: How to have 2 link colors on one page?
                onefiftymph Level 1

                Ok great. thanks ottz0  Will have a go at it tomorrow and see if I can get it working..