How to make colour of text change on hover

Discussion in 'HTML & Website Design' started by iGimp, Oct 30, 2010.

  1. #1
    Im not sure if this is html or css but i am using a template, i have changed it so when you hover over a menu link a image appears so you know you have selected it, this was done with css. But i want the colour of the text to change to white.

    My css code is:
    /** global **/
    body {
    	margin:0px auto;
    	padding:0;
    	font-family:Verdana, Geneva, sans-serif;
    	font-size:12px;
    	color:#333;
    	background:#fff url('images/body-bg.jpg') repeat-x;
    }
    * {
    	margin:0;
    	padding:0;
    }
    
    
    /** element defaults **/
    table {
    	width:100%;
    	font-family:Arial, Helvetica, sans-serif;
    	text-align:left;
    }
    th, td {
    	padding:5px 10px;
    }
    th {
    	color:#fff;
    	border-top:3px solid #082659;
    	background-color:#0C3A87;
    }
    td {
    	border-bottom:1px solid #f4f4f4;
    }
    code, blockquote {
    	display:block;
    	border-left:5px solid #ddd;
    	padding:10px;
    	margin-bottom:20px;
    }
    blockquote p {
    	font-style:italic;
    	font-family:Georgia, "Times New Roman", Times, serif;
    	margin:0;
    	height: 1%;
    }
    p {
    	line-height:1.9em;
    	margin-bottom:20px;
    }
    a {
    	color:#0D3C84;
    }
    a:hover {
    	color:#0C3A85;
    }
    a:focus {
    	outline:none;
    }
    fieldset {
    	display:block;
    	border:none;
    	border-top:1px solid #e0e0e0;
    }
    fieldset legend {
    	font-weight:bold;
    	font-size:13px;
    	padding-right:10px;
    	color:#222;
    }
    fieldset form {
    	padding-top:15px;
    }
    fieldset p label {
    	float:left;
    	width:150px;
    	font-family:Arial, Helvetica, sans-serif;
    }
    fieldset form input, fieldset form select, fieldset form textarea {
    	padding:5px;
    	color:#333333;
    	font-size:13px;
    	font-family:Arial, Helvetica, sans-serif;
    	border:1px solid #ddd;
    }
    fieldset form input.formbutton {
    	margin-left:150px;
    	background:#0C3A87;
    	border:none;
    	border-bottom:3px solid #082659;
    	color:#ffffff;
    	font-weight:bold;
    	padding:5px 10px;
    	font-size:13px;
    }
    h1 {
    	font-size:45px;
    	font-family:Arial, Helvetica, sans-serif;
    }
    h2 {
    	color:#061C41;
    	font-family:Arial,Helvetica,sans-serif;
    	font-size:30px;
    	font-weight:bold;
    	letter-spacing:-2px;
    	padding:0 0 5px;
    	margin:0;
    }
    h3 {
    	font-family:Arial,Helvetica,sans-serif;
    	color:#0D357B;
    	font-size:20px;
    	padding-bottom:10px;
    }
    h4 {
    	font-family:Arial,Helvetica,sans-serif;
    	padding-bottom:10px;
    	font-size:15px;
    	color:#0C3A85;
    }
    h5 {
    	padding-bottom:10px;
    	font-size:13px;
    	color:#666666;
    }
    ul, ol {
    	margin:0 0 35px 35px;
    }
    li {
    	padding-bottom:5px;
    }
    
    
    /** wrapper **/
    div#wrapper {
    	width:920px;
    	margin:0px auto;
    	padding:0;
    }
    
    
    /** sitename **/
    div#sitename h1 {
    	font-size:48px;
    	letter-spacing:-5px;
    	margin:0;
    	height:82px;
    	padding:18px 0 0;
    }
    div#sitename h1 a,
    div#sitename h1 a:hover {
    	color:#fff;
    	font-weight:normal;
    	text-decoration:none;
    }
    
    /** header **/
    div#header {
    	padding:50px 0 40px;
    	margin:0 auto;
    	height:111px;
    	background:transparent url('images/header-bg.jpg') no-repeat;
    }
    div#header h2 {
    	color:#ffffff;
    	padding-bottom:0;
    	font-weight:normal;
    	font-family:'Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,Sans-Serif;
    	font-size:32px;
    	letter-spacing:0;
    }
    div#header div.tagline {
    	color:#C2D7F9;
    	font-size:14px;
    	padding-bottom:10px;
    	font-family:Arial,Helvetica,sans-serif;
    }
    div#header div.tagline a {
    	color:#ffffff;
    }
    
    
    /** body **/
    div#body {
    	padding:10px 0;
    	background:#fff url('images/content-bg.jpg') repeat-x scroll top left;
    }
    
    
    /** content+sidebar styles **/
    div#content {
    	width:600px;
    }
    div.column-left {
    	float:left;
    	margin-right:20px;
    }
    div.column-right {
    	float:right;
    }
    div#sidebar {
    	width:268px;
    }
    div#sidebar ul {
    	margin:0;
    	padding:0;
    	list-style:none;
    }
    div#sidebar li ul {
    	margin-bottom:20px;
    	width:250px;
    }
    div#sidebar li ul li {
    	display:block;
    	padding:12px 10px;
    	border-bottom:1px solid #ddd;
    	color:#777;
    }
    div#sidebar li ul li a {
    	color:#333;
    	text-decoration:none;
    	font-family:Verdana, Geneva, sans-serif;
    	font-weight:normal;
    }
    div#sidebar li ul li a:hover {
       color:#fff;
       font-weight:bold;
       background:transparent url('images/item-selected.jpg') no-repeat;
    }
    
    
    div#sidebar li ul.blocklist li {
    	padding:0;
    }
    div#sidebar li ul.blocklist li.selected-item  {
    	border-bottom:none;
    }
    div#sidebar li ul.blocklist li.selected-item a:hover {
    	text-decoration:none;
    }
    div#sidebar li ul.blocklist li a {
    	color:#666;
    	width:260px;
    	display:block;
    	padding:13px 10px;
    }
    
    div#sidebar h4 { 
    	color:#0C367E;
    	font-family:arial;
    	font-size:16px;
    	text-transform:uppercase;
    	font-weight:bold;
    	margin:0;
    	padding:7px 10px;
    }
    
    
    /** footer **/
    div#footer {
    	padding:20px 20px;
    	color:#fff;
    	border-top:1px solid #ccc;
    }
    div#footer p {
    	color:#666;
    	margin:0;
    	font-size:11px;
    	width:50%;
    }
    div#footer p.left { float:left; }
    div#footer p.right { float:right; text-align:right; }
    div#footer p a {
    	color:#666;
    	font-weight:bold;
    	text-decoration:none;
    	border-bottom:1px solid #999;
    }
    
    
    
    /** clear fix **/
    .clear:after {
    	content: ".";
    	display: block;
    	clear: both;
    	visibility: hidden;
    	line-height: 0;
    	height: 0;
    }
     
    .clear {
    	display: inline-block;
    }
    .clear {
    	display: block;
    }
    
    Code (markup):
    I am using this template http://www.justfreetemplates.com/web-templates/view/1790.html
     
    iGimp, Oct 30, 2010 IP
  2. spy100

    spy100 Well-Known Member

    Messages:
    689
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    108
    #2
    to change link color on hover you have this line in your code

    you can change that number to black white red your choice or put a number from here http://www.w3schools.com/html/html_colors.asp
     
    spy100, Oct 30, 2010 IP
  3. iGimp

    iGimp Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    iGimp, Oct 30, 2010 IP
  4. style0

    style0 Peon

    Messages:
    108
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Put the following in your stylesheet:

    This will change the font color under the "navigate" menu section to white when you hover them.
     
    style0, Oct 30, 2010 IP