I have a very simple question. Whenever I surround a div with a pair of anchor tags, the div becomes clickable, but for some reason the clickable part extends past the dimensions of the div itself and goes across the page. How do I make the div clickable within it's boundaries and not stretched across the page? I have included my code here.
HTML
<!DOCTYPE html>
<html>
<head>
<title>My Webpage</title>
<link rel = "stylesheet" href = "mystyles.css" type = "text/css">
</head>
<body>
<div id = "link"></div>
</body>
</html>
And the CSS
#link {
background-color: #00ccee;
border: solid black 2px;
border-radius: 25px;
width: 150px;
height: 50px;
transition: 1s;
}
#link:hover{
background-color: blue;
width: 160px;
height: 60px;
margin-left: 30px;
}