How to make an embed image resize with browsers

66 views Asked by At

Here's the code for the embed:

<a href="URL"><img src="http://i.imgur.com/IMAGE1.png"
onmouseover="this.src='http://i.imgur.com/IMAGE2.png'" 
onmouseout="this.src='http://i.imgur.com/IMAGE1.png'"/></a>

Is there anything I can insert to make this resize properly?

2

There are 2 answers

0
Edward On

Here's what I did. Can't believe it took me so long.

Threw this in right before the first onmouseover:

style="width:100%;height:100%;"
0
Buck On

You can use css properties like width: 50% to make it resize to a percentage of its container. That should work for different browser sizes.