View Full Version : mouseover expanding and collapsing ad

11-08-2006, 01:36 AM

I have seen on some websites a normal 468x60 banner on the top of the page and when i get my mouse pointer on it the ad expands down it goes from 468x60 to something like 468x200, how does this work ?

can any1 help me ?

11-08-2006, 04:56 AM
This can be done using Image rollovers either using JavaScript or using CSS.

JavaScript Method

<title>JavaScript Image Rollovers</title></head>
<a href="#" onMouseOver="document.image1.src='2.jpg'" onMouseOut="document.image1.src='1.gif'">
<img src="1.gif" name="image1">

Here 1. gif is the small (normal ) image which is visible all the except user moves their mouse over it.

2.jpg is the big image which will be rolled over the 1.gif image visible only when the user placed their mouse over 1.gif

11-09-2006, 07:09 PM
And maybe, so : :)

<b>Expanded banner on mouseover.</b><br>
<table align=center style="height:100px;width:400px;border:1px solid red" background=fo167-YM20030829-1.jpg
onmouseover=this.style.height="320px" onmouseout=this.style.height="100px"><tr><td>&nbsp;</td></tr></table>

View example here: http://javascript.aho.ru/example/zzzz47.htm

11-09-2006, 07:10 PM
thx alot this is exactly the one