Copy link to clipboard
Copied
I have attempted moving the link around inside the div, moving the div in and out of the body.... copy and paste different peoples instructions i found on google, nothing works to get this banner image to hyperlink. I'm sure I am missing something simple. My code also has an error that says something needs to be closed and I can't for the life of me figure it out.
```<div id="RightFloatAds" style="right: 0px; position: fixed; text-align: center; top: 65px; background-color:black;color:black;border:5px solid black;" <a target="_blank" href="www.yahoo.com"><img src="banner1news.png" width="160" height="725" alt=""</a></div>```
Try adding the closing div and img tag > (see the 2 instances where they are missing, marked in red below):
<div id="RightFloatAds" style="right: 0px; position: fixed; text-align: center; top: 65px; background-color:black; color:black; border: 5px solid black;">
<a target="_blank" href="www.yahoo.com"><img src="banner1news.png" width="160" height="725" alt=""></a>
</div>
Copy link to clipboard
Copied
Try adding the closing div and img tag > (see the 2 instances where they are missing, marked in red below):
<div id="RightFloatAds" style="right: 0px; position: fixed; text-align: center; top: 65px; background-color:black; color:black; border: 5px solid black;">
<a target="_blank" href="www.yahoo.com"><img src="banner1news.png" width="160" height="725" alt=""></a>
</div>
Copy link to clipboard
Copied
If you can as well move away from inline styles.
While not required in HTML5 it is nice to try keep symatic markup and fundementals in place when coding (for me anyway) so properly closing the image /> is what I would do.
Copy link to clipboard
Copied
I tend to disagree with an unneccessary keystroke. What I find intriguing is the fact that `srcset` is never mentioned.
Copy link to clipboard
Copied
Why are you using so many inline styles in your markup? Unless this is an email newsletter, CSS styles rightfully belong in an external or embedded stylesheet. And if this is an email, you should use absolute urls to assets located on a publicly accessible server.
<div>
<a href="https://example.com/"><img src="https://dummyimage.com/500x100.jpg" alt="placeholder" title="Link to Example.com"></a>
<div>
Working example of code above: