Reputation: 13
I have created a button, as shown below. Now I am working on linking it. However the href part seems to be out of order. Does anyone know how to link the button to a site (use https://aol.com). Thank you
<body>
<div class="result15823794" style="width: 160px; height: 30px; background-image: url("http://static1.grsites.com/user/generate/items/button84799376.png" ;);
" onmouseover="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button76804217.png)'
" onmouseout="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button84799376.png)'">
<div style="background-image: url(http://static1.grsites.com/images/0.gif);
width: 160px; height: 30px;"></div>
</div>
</body>
Upvotes: 1
Views: 2370
Reputation: 1
<a href="https://aol.com" target="_blank">
add this after the body the <body>
tag, then add the closing of the anchor tag before the closing </body>
tag. Just like my code below.
<body>
<a href="https://aol.com" target="_blank">
<div class="result15823794" style="width: 160px; height: 30px; background-image: url("http://static1.grsites.com/user/generate/items/button84799376.png" ;);
" onmouseover="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button76804217.png)'
" onmouseout="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button84799376.png)'">
<div style="background-image: url(http://static1.grsites.com/images/0.gif);
width: 160px; height: 30px;"></div>
</div>
</a>
</body>
Upvotes: 0
Reputation: 1
you can wrap the outmost div with an anchor containing the href to AOL like this:
<a href="https://aol.com/"><div class="result15823794" style="width: 160px; height: 30px; background-image: url("http://static1.grsites.com/user/generate/items/button84799376.png" ;);
" onmouseover="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button76804217.png)'
" onmouseout="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button84799376.png)'">
<div style="background-image: url(http://static1.grsites.com/images/0.gif);
width: 160px; height: 30px;"></div>
</div></a>
Upvotes: 0
Reputation: 7295
onclick="location.href='https://aol.com/';"
Sample:
<body>
<div onclick="location.href='https://aol.com/';" class="result15823794" style="width: 160px; height: 30px; background-image: url("http://static1.grsites.com/user/generate/items/button84799376.png" ;);
" onmouseover="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button76804217.png)'
" onmouseout="this.style.backgroundImage = 'url(http://static1.grsites.com/user/generate/items/button84799376.png)'" onclick="location.href='https://aol.com/';">
<div style="background-image: url(http://static1.grsites.com/images/0.gif);
width: 160px; height: 30px;"></div>
</div>
</body>
Upvotes: 1