Hypn01991
10-29-2010, 06:52 PM
hello again cf members,
i'd like to know how to change the colour of my navigation link borders on hover? when i hover on nav links from left to right the border is not visible as i've assigned the same colour as the hover background colour to the border like so:
.nav-links li a:hover
{
color: #fff;
background-color:#1473e8;
border-left-color: #1473e8;
border-right-color: #1473e8;
}
=
http://i54.tinypic.com/sngx28.png
however the border is still visible when hovering from right to left:
http://i54.tinypic.com/33uv8t4.png
here is the full html/css code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/master.css" rel="stylesheet" type="text/css" />
<title>Home</title>
</head>
<body id="home">
<div id="page-container">
<div id="main-nav">
<ul class="nav-links">
<li><a href="index.html" id="homenav" title="Home">Home</a></li>
<li><a href="services.html" id="servnav" title="Services">Services</a></li>
<li><a href="products.html" id="prodnav" title="Products">Products</a></li>
<li><a href="about.html" id="aboutnav" title="About Us">About Us</a></li>
<li class="borderx2"><a href="contact.html" id="contnav" title="Contact">Contact</a></li>
</ul>
</div>
#main-nav
{
clear:both;
float:left;
padding-left:10px;
}
.nav-links li
{
float: left;
list-style-type: none;
display:block;
}
.nav-links li a
{
float: left;
width: 85px;
height: 41px;
text-decoration: none;
text-transform: capitalize;
color: #1473e8;
background-color:#fff;
font-size: 12px;
text-align: center;
padding-top: 25px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #e4e4e4;
}
.nav-links li a:hover
{
color: #fff;
background-color:#1473e8;
border-left-color: #1473e8;
border-right-color: #1473e8;
}
li.borderx2
{
border-right-width: 1px;
border-right-style: solid;
border-right-color: #e4e4e4;
}
body#home a#homenav,
body#services a#servnav,
body#products a#prodnav,
body#about a#aboutnav,
body#contact a#contnav
{
color: #fff;
background: #1473e8;
}
i hope you understand wat im trying to achieve & thank you for your time
i'd like to know how to change the colour of my navigation link borders on hover? when i hover on nav links from left to right the border is not visible as i've assigned the same colour as the hover background colour to the border like so:
.nav-links li a:hover
{
color: #fff;
background-color:#1473e8;
border-left-color: #1473e8;
border-right-color: #1473e8;
}
=
http://i54.tinypic.com/sngx28.png
however the border is still visible when hovering from right to left:
http://i54.tinypic.com/33uv8t4.png
here is the full html/css code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/master.css" rel="stylesheet" type="text/css" />
<title>Home</title>
</head>
<body id="home">
<div id="page-container">
<div id="main-nav">
<ul class="nav-links">
<li><a href="index.html" id="homenav" title="Home">Home</a></li>
<li><a href="services.html" id="servnav" title="Services">Services</a></li>
<li><a href="products.html" id="prodnav" title="Products">Products</a></li>
<li><a href="about.html" id="aboutnav" title="About Us">About Us</a></li>
<li class="borderx2"><a href="contact.html" id="contnav" title="Contact">Contact</a></li>
</ul>
</div>
#main-nav
{
clear:both;
float:left;
padding-left:10px;
}
.nav-links li
{
float: left;
list-style-type: none;
display:block;
}
.nav-links li a
{
float: left;
width: 85px;
height: 41px;
text-decoration: none;
text-transform: capitalize;
color: #1473e8;
background-color:#fff;
font-size: 12px;
text-align: center;
padding-top: 25px;
border-left-width: 1px;
border-left-style: solid;
border-left-color: #e4e4e4;
}
.nav-links li a:hover
{
color: #fff;
background-color:#1473e8;
border-left-color: #1473e8;
border-right-color: #1473e8;
}
li.borderx2
{
border-right-width: 1px;
border-right-style: solid;
border-right-color: #e4e4e4;
}
body#home a#homenav,
body#services a#servnav,
body#products a#prodnav,
body#about a#aboutnav,
body#contact a#contnav
{
color: #fff;
background: #1473e8;
}
i hope you understand wat im trying to achieve & thank you for your time