62 users online (1 members and 61 guests)  


  Results 1 to 2 of 2

Related

  1. Link to Middle of Page    Forum: HTML Forum
    Replies: 11
  2. Replies: 4
  3. Replies: 3
  4. Replies: 6
  5. Replies: 1
  1. #1
    helenw's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2001
    Location
    Rockville, MD USA
    Posts
    5

    Question Changing link colors in middle of page

    I am building my website and using a background that is two different colors. One dark blue and the other white. I want the link, vlink, and alink colors different on the two parts of the page but I don't know how to change them mid page. Help!
    The page is not done but I posted the page just so you could see what I am talking about. http://www.gtpension.com/index3.html

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Talking

    Hi Helen, Welcome to AHFB.

    You will be wanting to use Cascading Style Sheets for this affect(CSS). Have you used them before?

    In the HEAD of your document, paste the following -

    <style>
    <!--
    a { font: 12pt verdana; color: #556675; }
    a:hover { color: black; }

    .other a { color: blue; }
    .other a:hover { color: #000000; }
    -->
    </style>

    Obviously, you would change the font and color values to match what you are after. Now in the link you want to be different-

    <span class="other"><a href="blah.html">test</a></span>

    What that does is to make all links with the span around them follow the rules you have set in .other, and the ones without to follow the other rules.

    This is a quick fix, rushed. If you want a primer on CSS, then follow Daves tutorial links to find my two short tutorials on CSS.

    I bet I just made all that sound horribly complex. Any questions, just post 'em.


    HTH



    ------------------
    QuietDean-



Tags for this Thread