Add border to anchor hover effect in HTML and CSS
Description
The following code shows how to add border to anchor hover effect.
Example
<html>
<head>
<!-- ww w . j ava2s .c o m-->
<style type="text/css">
#navsite ul li a:hover {
border-left: 10px solid #036;
border-right: 1px solid #69c;
border-bottom: 1px solid #369;
background-color: #69f;
color: #fff;
}
</style>
</head>
<body id="pagespk">
<div id="navsite">
<h5>Site navigation:</h5>
<ul>
<li><a href="" id="linkhom">Home</a></li>
<li><a href="" id="linkabt">About</a></li>
<li><a href="" id="linkarh">Archives</a></li>
<li><a href="" id="linkwri">Writing</a></li>
<li><a href="" id="linkspk">Speaking</a></li>
<li><a href="" id="linkcnt">Contact</a></li>
</ul>
</div>
</body>
</html>
The code above generates the following result.
HTML CSS Tutorial Anchor
Add title attribute to anchor in HTML and C...
Create a basic link to an external web site...
Create a basic link to another page within ...
Create a link to a specific part of the pag...
Create a link to send an email in HTML and ...
Create a link with white space in HTML and ...
Create a mail to link in HTML and CSS
Create absolute link starting with http:// ...
Create an Image Link with anchor element an...
Link to the same page with anchor in HTML a...
Set Link target in HTML and CSS
Set font size and color for visited anchor ...
Set font weight and color for active anchor...
Set font weight and color for anchor hover ...
Set id for anchor element in HTML and CSS
Add border to anchor hover effect in HTML a...
Add link to another file in the same folder...Add title attribute to anchor in HTML and C...
Create a basic link to an external web site...
Create a basic link to another page within ...
Create a link to a specific part of the pag...
Create a link to send an email in HTML and ...
Create a link with white space in HTML and ...
Create a mail to link in HTML and CSS
Create absolute link starting with http:// ...
Create an Image Link with anchor element an...
Link to the same page with anchor in HTML a...
Set Link target in HTML and CSS
Set font size and color for visited anchor ...
Set font weight and color for active anchor...
Set font weight and color for anchor hover ...
Set id for anchor element in HTML and CSS