Hey guys playing around with CSS. I made a box. Basically what iam trying to figure out is how when the person hovers over the box it will change colour and then link them to anther page in a new tab. Can anyone help me?
Code so far.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="eng" lang="eng">
<head>
<style>
.border
{
height: 150px;
width: 150px;
border: 1px solid black;
text-align:center;
}
</style>
</head>
<body>
<div class="border">
<a href="http://www.1.com/"></a>
</div>
</body>
</html>
For the color changing part use the CSS
:hoverpseudo classfor the link open part use
target="_blank"in the link tagThat will open the link in a new tab or window depending on the browser settings of the user (which you cannot influence)