Is it possible to affect one element by another element? I want to move .box
element when I click on the link a.link
.
I tried this, But couldn't get it to work. What should I write at link:active
?
<html>
<head>
<style>
.box
{
height:100px;
width:200px;
border:solid red 5px;
}
.link:hover
{
color:red;
}
.link:active
{
color:grey;
}
</style>
</head>
<body>
<a href="#" class=link >CLICK ME</a>
<div class=box></div>
</body>
</html>