Welcome to WebmasterWorld Guest from 54.198.87.238

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

random image javascript question

     
10:15 pm on Mar 28, 2003 (gmt 0)

10+ Year Member



I have random image javascript. It works; however, The script creates a space between the cell that maintains the script and the cell below it. Can anyone help?

<TD width=624 bgcolor="#004f9d">
<SCRIPT LANGUAGE="JAVASCRIPT">
var img_rnd = new Array ("one_624.jpg", "two_624.jpg", "three_624.jpg", "four_624.jpg", "five_624.jpg", "six_624.jpg", "seven_624.jpg");
var i = Math.round(Math.random() * 7);
document.write('<IMG SRC="index_files/' + img_rnd[i] + '" WIDTH="624" HEIGHT="118" BORDER="0" ALT="">');
</SCRIPT>
</TD>

2:56 am on Mar 29, 2003 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Which browsers give you a space?
7:50 pm on Mar 30, 2003 (gmt 0)

10+ Year Member



What exactly do you mean by it leaving a space?

If you mean what I -THINK- you mean, well it has nothing to do with the script. All the script does is load the image, it has nothing to do with spacing. --

You might want to play with the cellpadding and cellspacing features of the table.

e.x. ( <Table cellpadding="0" cellspacing="0"> )

Cellpadding is the space between the cell content and the border (If border=0, then the perimeter). Cellspacing is the space that would be between each cell.

I hope I helped!, If I haven't, please explain your question more. I would be GLAD to help!

 

Featured Threads

Hot Threads This Week

Hot Threads This Month