SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: links colors

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up links colors

    hi
    now ahats hapening here with my code is that when page is loaded the bg color of link is light red and on mouseover dark red and on mouseout again light red.

    i want that when u user clicks the link it should be dark red of the link clicked and all others light red means which ever he clicks shoud be dark red and all others light red even he put his mouse out of the link.

    HTML Code:
    <tr>
                          <td height="18" bgcolor="#D1838C" style="padding-left:8px; "class=tdlnav2off onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="#afsstrategic" class="ver-11-white">AFS Strategic Objectives</a></td>
                        </tr>
                        <tr>
                          <td height="18" bgcolor="#D1838C" style="padding-left:8px; "class=tdlnav2off onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="#afsmanagement" class="ver-11-white">AFS Management</a></td>
                        </tr>
                        <tr>
                          <td height="18" bgcolor="#D1838C" style="padding-left:8px; "class=tdlnav2off onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="#afspartners" class="ver-11-white">AFS Partners</a></td>
                        </tr>
                        <tr>
    its urgent plzzz.....
    regards
    phphelp

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    maybe this is what you want, one time use only, to test rename a 's

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	body{background-color:#e9e9e9;}
    	a{background-color:#ff0000;
    	font-family: Arial, Verdana, Geneva , Helvetica, sans-serif;
    	font-size: 20px;
    	padding-right: 10px;
    	color: #ffffff;
    	text-decoration: none;
    	}
    	a:visited{color:#ffff00;background-color:#cc0000;}
    	a:hover{color:#ffff00;background-color:#cc0000;}
    	a:active{color:#00ff00;}
    	</style>
    </head>
    <body>
    <div class="page1">
    <a href="xc">Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a>
    </div>
    </body>
    </html>

  3. #3
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thier is one problem.
    i dont want on all anchor tags in page means not on all links only on selected links.

    how can i now?
    its urgent plzzz.....
    regards
    phphelp

  4. #4
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    jeheee man

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	body{background-color:#e9e9e9;}
    	.ver-11-white a{background-color:#ff0000;
    	font-family: Arial, Verdana, Geneva , Helvetica, sans-serif;
    	font-size: 20px;
    	padding-right: 10px;
    	color: #ffffff;
    	text-decoration: none;
    	}
    	
    	.ver-11-white{/*hope you can override it*/}
    	
    	
    	.ver-11-white a:visited{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:hover{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:active{color:#00ff00;}
    	</style>
    </head>
    <body>
    <div class="ver-11-white">
    <a href="xc">Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a>
    </div>
    
    <div>
    <a href="xc">Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a>
    </div>
    
    </body>
    </html>

  5. #5
    SitePoint Evangelist
    Join Date
    Jan 2005
    Location
    bahrain
    Posts
    553
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    now only the bach ground color of the link is changing. actually the whole 'td' color should be changed to red color on click of link???
    its urgent plzzz.....
    regards
    phphelp

  6. #6
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    jeheee

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	
    	body{background-color:#e9e9e9;}
    	
    	.ver-11-white a{
    	background-color:#ff0000;
    	font-family: Arial, Verdana, Geneva , Helvetica, sans-serif;
    	font-size: 20px;
    	padding-right: 10px;
    	color: #ffffff;
    	text-decoration: none;
    	}
    	
    	.style a{
    	float:left;
    	display:block;
    	width:80px;
    	height:20px;
    	margin-right:5px;
    	padding:5px;
    	}/*  */
    	
    	.stb a{
    	display:block;
    	width:80px;
    	height:18px;
    	margin-right:5px;
    	padding-left:8px;
    	}/*  */
    	
    	.stb .w{width:250px;}
    	
    	.clf{clear:both;}
    	
    	.ver-11-white{/*hope you can override it*/}
    	
    	
    	.ver-11-white a:visited{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:hover{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:active{color:#00ff00;}
    	</style>
    </head>
    <body>
    <div class="ver-11-white stb">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td  class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afsstrategic" class="ver-11-white w">AFS Strategic Objectives</a></td>
    </tr>
    <tr>
    <td class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afsmanagement" class="ver-11-white w">AFS Management</a></td>
    </tr>
    <tr>
    <td  class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afspartners" class="ver-11-white w">AFS Partners</a></td>
    </tr>
    </table><br /><br /><br />
    </div>
    
    <div class="ver-11-white stb">
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    	<td><a href="xc"> Hello</a></td>
    	<td><a href="xcc"> Hello</a></td>
    	<td><a href="xccc"> Hello</a></td>
    	<td><a href="xcccc"> Hello</a></td>
    	<td><a href="xccccc"> Hello</a></td>
    	<td><a href="xcccccc"> Hello</a></td>
    </tr>
    </table><br /><br /><br />
    </div>
    
    <div class="ver-11-white style">
    <a href="xc"> Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a><br /><br /><br />
    </div>
    
    
    <div class="ver-11-white clf">
    <a href="xc"> Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a><br /><br /><br />
    </div>
    
    <div class="clf">
    <a href="xc"> Hello</a>
    <a href="xcc"> Hello</a>
    <a href="xccc"> Hello</a>
    <a href="xcccc"> Hello</a>
    <a href="xccccc"> Hello</a>
    <a href="xcccccc"> Hello</a>
    </div>
    
    </body>
    </html>
    your table ?

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    	<title>12345 12345 12345 12345 12345 </title>
    	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    	<style type="text/css">
    	
    	body{background-color:#e9e9e9;}
    	
    	.ver-11-white a{
    	background-color:#ff0000;
    	font-family: Arial, Verdana, Geneva , Helvetica, sans-serif;
    	font-size: 14px;
    	padding-right: 10px;
    	color: #ffffff;
    	text-decoration: none;
    	}
    	
    	.stb a{
    	display:block;
    	height:18px;
    	width:180px;
    	padding:1px 1px 1px 8px;
    	} /* style a */
    	
    	.ver-11-white a:visited{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:hover{color:#ffff00;background-color:#cc0000;}
    	.ver-11-white a:active{color:#00ff00;}
    	
    	</style>
    </head>
    <body>
    <table border="0" cellpadding="0" cellspacing="1" class="ver-11-white stb">
    <tr>
    <td  class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afsstrategic" class="ver-11-white">AFS Strategic Objectives</a></td>
    </tr>
    <tr>
    <td class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afsmanagement" class="ver-11-white">AFS Management</a></td>
    </tr>
    <tr>
    <td  class="tdlnav2off" onmouseover="this.className='tdlnav2on'" onmouseout="this.className='tdlnav2off'"><a href="afspartners" class="ver-11-white">AFS Partners</a></td>
    </tr>
    </table>
    </body>
    </html>
    Last edited by all4nerds; May 6, 2005 at 11:16.

  7. #7
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,366
    Mentioned
    179 Post(s)
    Tagged
    6 Thread(s)
    Thread closed - duplicated here


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
  •