Results 1 to 5 of 5
  1. #1

    problem using a script from media college

    Hello,

    first time poster here, I recently found your site while searching for a way to randomly display images. I use the code found here:

    http://www.mediacollege.com/internet...ge/random.html

    it works fine, but there's now 3-5px of white space at the bottom of my images. I'm not sure why. Can anyone help figure out how to remove this?

    thanks in advance, it is greatly appreciated.

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79

    Re: problem using a script from media college

    Can you show us the URL?
    Dave Owen
    MediaCollege.com

  3. #3

    Re: problem using a script from media college

    when I test it in Netscape the space is not there...but in IE it is...
    *EDITED*

    wow not sure what was different, I copied the script code from my test page, into a dummy new page, to test it, and there was not gap...copied the code from teh new page, back into my test page, and viola, no more gap...

    gremlins in the system I guess...

    thanks for looking at least....

    till next time \m/
    Last edited by buckfu; 26th Oct 2005 at 21:47.

  4. #4
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79

    Re: problem using a script from media college

    Yes, I see it the same way. I think it's just the way IE displays JavaScript and I don't think there's any way to fix it. However here's a suggested workaround in your case:

    Since all your random images have the same colour at the bottom and blend into the cell below, give the cell containing the image the same background colour. Like this:
    Code:
    ....
    <td height="243" colspan="3" valign="bottom" align="left" bgcolor="#ECE0CA">
    			
    <script language="Javascript">
    <!--
    .... etc
    Although the space is still there, it's effectively invisible.

    BTW, You might want to run an HTML validator over the page. I think your div tags are overlapping and/or unclosed.
    Dave Owen
    MediaCollege.com

  5. #5
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79

    Re: problem using a script from media college

    Quote
    Quote: buckfu
    *EDITED*

    wow not sure what was different, I copied the script code from my test page, into a dummy new page, to test it, and there was not gap...copied the code from teh new page, back into my test page, and viola, no more gap...
    Well, that intrigued me enough to investigate more and I've found what causes it. It's nothing more than a line break in the code between the end of the script and the end of the cell.

    This creates the gap:
    </script>
    </td>

    This leaves no gap:
    </script></td>

    You learn something new every day
    Dave Owen
    MediaCollege.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube