homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

random image javascript question

10+ Year Member

Msg#: 440 posted 10:15 pm on Mar 28, 2003 (gmt 0)

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">
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="">');



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

Msg#: 440 posted 2:56 am on Mar 29, 2003 (gmt 0)

Which browsers give you a space?


10+ Year Member

Msg#: 440 posted 7:50 pm on Mar 30, 2003 (gmt 0)

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!

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved