www.webdeveloper.com
Results 1 to 3 of 3

Thread: Help with active links

  1. #1
    Join Date
    Aug 2011
    Posts
    6

    Help with active links

    Im using pseudo classes to style the background of links based on their state, I have it working for the hover effect but I just can't seem to get it working for active links.

    Code:
    #sprynav li a{
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 1em;
    	text-decoration: none;
    	font-weight: normal;
    	line-height: 3em;
    	padding-top: 17px;
    	padding-bottom: 12px;
    	position: relative;
    	top: 4px;
    	color: #FFF;
    	padding-right: 5px;
    	padding-left: 5px;
    	border-left: 1px solid #fff;
    	border-right: 1px solid #fff;
    	background:url(../_images/standardback.png)
    }
    
    
    #sprynav li a:hover {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 1em;
    	text-decoration: none;
    	font-weight: normal;
    	line-height: 3em;
    	padding-top: 17px;
    	padding-bottom: 12px;
    	position: relative;
    	top: 4px;
    	color: #FFF;
    	padding-right: 5px;
    	padding-left: 5px;
    	border-left: 1px solid #fff;
    	border-right: 1px solid #fff;
    	background:url(../_images/backdowntwo.png)
    }
    
    #sprynav li a:active {
    	font-family: Arial, Helvetica, sans-serif;
    	font-size: 1em;
    	text-decoration: none;
    	font-weight: normal;
    	line-height: 3em;
    	padding-top: 17px;
    	padding-bottom: 12px;
    	position: relative;
    	top: 4px;
    	color: #FFF;
    	padding-right: 5px;
    	padding-left: 5px;
    	border-left: 1px solid #fff;
    	border-right: 1px solid #fff;
    	background:url(../_images/backdowntwo.png)
    }

    Any help?

  2. #2
    Join Date
    Aug 2011
    Posts
    6
    Anyone?

  3. #3
    Join Date
    Sep 2011
    Posts
    1
    Without seeing the site in action it's difficult to say, but have you tried adding !important to the end of the background url, i.e:

    Code:
    background:url(../_images/backdowntwo.png) !important;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles