HTML Code:
<body><a id="imageurl" ><img id="Rotating1" border="0"></img></a><script language="JavaScript"> function RotateImages(Start) { var a = new Array("image1.jpg","image2.jpg","image3.jpg", "image4.jpg"); var c = new Array("url1", "url2", "url3", "url4"); var b = document.getElementById('Rotating1'); var d = document.getElementById('imageurl'); if(Start>=a.length) Start=0; b.src = a[Start]; d.href = c[Start]; window.setTimeout("RotateImages(" + (Start+1) + ")",3000); } RotateImages(0); </script></body>
I have used the above code to the fullest. It works great.
I have additionally embedded the rotating images in a table.
The images are of varying sizes.
Currently all the images start on the left edge in the table.
How do I center these images in the table so that they spring out from the table center? I have used additional table code as below.
HTML Code:
</table>
</div>
<table border="1" width="350" height="200" align="center" >
<tr>
<td>
<p align=”center”>
<body>
ROTATING IMAGE CODE
HTML Code:
RotateImages(0);
</script>
</body>
</p>
</td>
</tr>
</table>
Note that <p align=”center”> does not help to center these images in the table.