Extra Space in IE - The Sequel

F

fleemo17

I have another table layout that looks good in all the browsers I've
tested it in *except*, once again, IE on the PC. In IE there's extra
space around some of the table cells making up the layout. Apparently,
the problem lies with the bit of javascript I've used to randomly
display a photo on the page. If I take the javascript out, the pieces
of the layout fit together seamlessly. Put the javascript back in and
gaps appear.

Here's the line of code:
<td colspan="2"><script type="text/javascript"
src="random_header.js"></script><noscript><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript></td>

And here's the page:
http://www.kileecooper.com

Any clue why the addition of a javascript reference would add space
around the layout?

Thanks.

-Ray
 
M

Martin Jay

In message said:
I have another table layout that looks good in all the browsers I've
tested it in *except*, once again, IE on the PC. In IE there's extra
space around some of the table cells making up the layout. Apparently,
the problem lies with the bit of javascript I've used to randomly
display a photo on the page. If I take the javascript out, the pieces
of the layout fit together seamlessly. Put the javascript back in and
gaps appear.

Here's the line of code:
<td colspan="2"><script type="text/javascript"
src="random_header.js"></script><noscript><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript></td>

The HMTL of the page looks like this here.

<SCRIPT src="The Kilee Cooper Website_files/random_header.js"
type=text/javascript></SCRIPT>
<NOSCRIPT><IMG height=275 alt="Polaroid of Kilee"
src="The Kilee Cooper Website_files/random1.jpg"


I'm not splitting hairs, though. Just pointing out that </SCRIPT> and
<NOSCRIPT> need to be next to each other, like so:

<SCRIPT src="The Kilee Cooper Website_files/random_header.js"
type=text/javascript></SCRIPT><NOSCRIPT><IMG height=275
alt="Polaroid of Kilee"
src="The Kilee Cooper Website_files/random1.jpg"


And remove the "\n" from the random_header.js file, so:

document.write(programs[index] + "\n");

becomes:

document.write(programs[index]);
 
F

fleemo17

And remove the "\n" from the random_header.js file...<

Martin, you da man! Removing that "/n" did the trick! Thank you!
What the heck was that supposed to do, anyway?

On a side note, the other items you mentioned, like having the <script>
and <noscript> together, etc., it must be an issue of whatever you used
to view the source code, as the actual code does do just that. Here's
the code as it appears in the HTML document:

<script type="text/javascript"
src="random_header.js"></script><noscript><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript>

But hey, bottom line is you fixed the problem! Many many thanks! :D
 
H

Harlan Messinger

Martin, you da man! Removing that "/n"

\n, not /n
did the trick! Thank you!
What the heck was that supposed to do, anyway?

Exactly what it did. In all the character strings of all C-like
languages including Javascript, \n = new line, \r = carriage return, \t
= tab, \f = form feed, etc.
 
M

Martin Jay

Martin, you da man! Removing that "/n" did the trick! Thank you!

Pleased to help. :)
What the heck was that supposed to do, anyway?

\n is new line.
On a side note, the other items you mentioned, like having the <script>
and <noscript> together, etc., it must be an issue of whatever you used
to view the source code

Oh, that's odd. But as you say, it may have been added by one of the
applications I use. :(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top