IE中的额外空间 - 续集 [英] Extra Space in IE - The Sequel

查看:63
本文介绍了IE中的额外空间 - 续集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有另一个表布局在所有浏览器中看起来都不错我已经* * b $ b在*中测试它除了*,再一次,PC上的IE。在IE中,构成布局的一些表格单元周围有额外的

空间。显然,

问题在于javascript我曾经随机地使用

在页面上显示照片。如果我把javascript拿出来,布局的部分

可以无缝地组合在一起。把javascript重新放入,然后出现
差距。


这里是代码行:

< td colspan =" 2">< script type =" text / javascript"

src =" random_header.js">< / script>< noscript>< img src = " images / random1.jpg"

width =" 268"高度= QUOT; 275" alt =" Polaroid of Kilee">< / noscript>< / td>


这里是页​​面:
http://www.kileecooper.com


任何线索为何添加一个javascript引用会在布局周围增加空间

吗?


谢谢。


-Ray

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

推荐答案

在消息< 11 ********************* @ c74g2000cwc .googlegroups。 com>,
fl******@comcast.net 写道
In message <11*********************@c74g2000cwc.googlegroups. com>,
fl******@comcast.net writes
我有另一个表格布局,在我除了*之外的所有浏览器中都看起来不错,再次在PC上测试IE。在IE中,构成布局的一些表格单元周围有额外的空间。显然,问题在于我曾经常常随机地在页面上显示照片。如果我把javascript取出来,布局的部分就可以无缝地组合在一起了。重新放入javascript并显示间隙。

这里是代码行:
< td colspan =" 2">< script type = " text / javascript"
src =" random_header.js">< / script>< noscript>< img src =" images / random1.jpg"
width =" 268"高度= QUOT; 275" alt =" Polaroid of Kilee">< / noscript>< / td>
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>




页面的HMTL在这里看起来像这样。


< SCRIPT src =" Kilee Cooper Website_files / random_header.js"

type = text / javascript>< / SCRIPT>

< NOSCRIPT>< IMG height = 275 alt =" Klee的Polaroid"

src =" The Kilee Cooper Website_files / random1.jpg"

I'但是,不要分裂头发。只是指出< / SCRIPT>和

< NOSCRIPT>需要彼此相邻,如下:


< SCRIPT src =" Kilee Cooper Website_files / random_header.js"

type = text / javascript>< / SCRIPT>< NOSCRIPT>< IMG height = 275

alt =" Klee宝丽来

src =" Kilee Cooper Website_files /random1.jpg"

并删除\ n来自random_header.js文件,所以:


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


成为:


document.write(程序[索引]);


-

Martin Jay

电话/短信:+44 7740 191877

传真:+44 870 915 2124



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]);

--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124


>并删除\ n来自random_header.js文件......<


马丁,你这个男人!删除/ n做了伎俩!谢谢!

无论如何应该做什么?


在附注中,你提到的其他项目,比如<脚本>

和< noscript>一起等等,它必须是你使用的任何问题

来查看源代码,因为实际的代码就是这样做的。这里是HTML文档中显示的代码:


< script type =" text / javascript"

src =" random_header.js">< / script>< noscript>< img src =" images / random1.jpg"

width =" 268"高度= QUOT; 275" alt =Poleroid of Kilee>< / noscript>


但是,嘿,底线是你修复了问题!非常感谢! :D

> 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


fl ****** @ comcast .net 写道:
并删除\ n来自random_header.js文件......<
马丁,你这个男人!删除/ n
And remove the "\n" from the random_header.js file...<
Martin, you da man! Removing that "/n"



\ n,而不是/ n

就行了!谢谢!
无论如何应该做些什么?



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




它究竟是做了什么。在所有C类

语言的所有字符串中,包括Javascript,\ n =新行,\r =回车,\t

= tab, \f =换页等。



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.


这篇关于IE中的额外空间 - 续集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆