#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    106
    Rep Power
    12

    Question CSS a:link function - simple (hopefully!!!)


    Hey all,

    I have a problem. On my website I want the links in the navbar to go bold when you roll over them. However I want to keep the links on the page normal and have a different style for them? I am currently using a:link, a:hover etc.....

    Any ideas would be appreciated!!! Thanks. Jack.
  2. #2
  3. Insignificant Peon
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Tharsis Ridge (Martian lowlands)
    Posts
    194
    Rep Power
    12
    Just define 2 styles in your css.

    Example for main content links:

    a:link { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a:visited { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a:active { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a:hover { text-decoration: underline; font-weight: normal; color: #xxxxxx; background-color: transparent }

    Example for navbar links:

    a.navlink:link { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a.navlink:visited { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a.navlink:active { text-decoration: none; font-weight: normal; color: #xxxxxx; background-color: transparent }
    a.navlink:hover { text-decoration: none; font-weight: bold; color: #xxxxxx; background-color: transparent }

    Then, simply define the links in the navbar like so...

    <a href="blah-blah" class="navlink">Navigation link #1</a>
    Last edited by Nunzio390; April 6th, 2004 at 03:47 PM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    106
    Rep Power
    12
    Thank you, very much appreciated, more a PHP programmer than CSS (as you probably realised!!!).

    Anyways Thanks a ton.

IMN logo majestic logo threadwatch logo seochat tools logo