SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Threaded View

  1. #1
    SitePoint Enthusiast mslee's Avatar
    Join Date
    Dec 2012
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face How do i make an active link stay the same color when the page has been visited

    HTML Code:
    <div id="nav">
    <br></br>
    
    <ul>
    <li><h3><a href="index.html">Home</a></h3></li>
    <li><h3><a href="construction.html">Construction</a></h3></li>
    <li><h3><a href="it.html">I T Dept</a></h3></li>
    <li><h3><a href="web.html">Websites</a></h3></li>
    <li><h3><a href="cf.html">Company Forms</a></h3></li>
    <li><h3><a href="smf.html">Site Management Forms</a></h3></li>
    <li><h3><a href="phonebook.html">Phone Book</a></h3></li>
    </ul>
    
    </div><!-- nav ends here -->
    Code css:
    #nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    }
     
    #nav ul li {
    margin: 0 0 10px;
     
     
    }
     
    #nav ul li a {
    border:2px solid #000033;
    border-left: none;
    display: block;
    font-weight: bold;
    text-shadow: none;
    -moz-text-shadow: none;
    -webkit-text-shadow: none;
    text-transform: uppercase;
    padding: 2px 5px;
    }
     
    #nav ul li a:link{
    background-color: #99ccff;
    color: #000033;
    width: 200px;
    border-radius: 0 1em 1em 0;
    }
     
    #nav ul li a:visited {
    color: #000033;
    background-color: #99ccff;
    }
     
    #nav ul li a:hover{
     position: relative;
    color: #000033;
    background-color: #99ccff;
    width: 200px;
    border-radius: 0 1em 1em 0;	
     
    }
     
    #nav ul li a:active{
    color:#fff;
    background-color:#000033;
    text-decoration: none;
    }
    Last edited by Stevie D; Dec 12, 2012 at 06:26. Reason: Code tags added


Tags for this Thread

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
  •