SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot dustbuster's Avatar
    Join Date
    Jan 2003
    Location
    End-World
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS link problems

    I'm having trouble with links in my CSS. What I want to do is make a visited link look and behave like a link that has not been visited. I am using an external CSS file.

    Here is the code

    Code:
    body {font-family: Arial, Helvetica, sans-serif; font-size: 10pt;}
    .maintext {font-size: 10pt;}
    .internallink:link {font-size: 10pt; color: #674E43; text-decoration: underline;}
    .internallink:hover {font-size: 10pt; color: #A88170; text-decoration: none;}
    .internallink:active {font-size: 10pt; color: #A88170; text-decoration: underline;}
    .internallink:visited {font-size: 10pt; color: #674E43; text-decoration: underline;}
    And I'm using it like this.
    Code:
     
    //In the head section
    <link rel="stylesheet" type="text/css" href="master.css">
     
    //In the body section
    <a href="<A href="http://www.mysite.com">http://www.mysite.com" class="internallink">Here is a Link</a>
    Can anyone help or give suggestions on how I can make my CSS work better?
    Last edited by dustbuster; Mar 17, 2003 at 17:07.

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    links HAVE to be specified with the a anchor.

    a.internallink:link {font-size: 10pt; color: #674E43; text-decoration: underline;}
    a.internallink:hover {font-size: 10pt; color: #A88170; text-decoration: none;}
    a.internallink:active {font-size: 10pt; color: #A88170; text-decoration: underline;}
    a.internallink:visited {font-size: 10pt; color: #674E43; text-decoration: underline;}
    Aaron Brazell
    Technosailor



  3. #3
    pg for mild peril cow's Avatar
    Join Date
    Mar 2000
    Location
    nevada, usa
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    in your master.css file, make sure you have the items ordered like this:

    link
    visited
    active
    hover

    otherwise, you won't get the desired results.
    "There's no justice like angry mob justice!" --Seymour Skinner

  4. #4
    SitePoint Zealot dustbuster's Avatar
    Join Date
    Jan 2003
    Location
    End-World
    Posts
    148
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks to both. That's what I needed.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •