Creating Link Boxes in CSS

Saturday, September 11th, 2010 Programming

[html]

<html>
<head>
<style type="text/css">
a:link,a:visited
//Styles to be applied in link Box

{
display:block;
font-weight:bold;
color:#FFFFFF;
background-color:#98bf21;
width:120px;
text-align:center;
padding:4px;
text-decoration:none;
}
a:hover,a:active
{
background-color:#7A991A;
}
</style>
</head>

<body>
<a href="default.asp" target="_blank">This is a link</a>
</body>
</html>

[/html]

Output:

The link box will be created with the Specified Styles.

1 Comment to Creating Link Boxes in CSS

Dinesh Karki
April 26, 2011

thank’s for a helpful post.

Leave a comment