简体   繁体   English

在IE中嵌入gwt应用程序之前的多余行

[英]Extra lines before embedded gwt application in IE

I noticed there is at least two line linebreak after top html code before embedded gwt application in case of IE6/7/8, For other browser, this cannot be seen. 我注意到在IE6 / 7/8的情况下,在嵌入式gwt应用程序之前的顶级html代码之后,至少有两个换行符,对于其他浏览器来说,这是看不到的。

Eg html code 例如html代码

<body> 
mymenu 
<div id="gwtapplication"></div> 
</body> 

There will be two lines after mymenu and gwt application. mymenu和gwt应用后将有两行。 Note the application uses absolute panel which may be relevant. 请注意,该应用程序使用可能相关的绝对面板。 There is no problem if there is no mymenu like html code. 如果没有像HTML代码这样的mymenu,就没有问题。 A very simple text already produces this effect. 一个非常简单的文本已经产生了这种效果。 Moving up the gwt application by repositioning the absolute y coordinate does not help because then the top of the application is hidden by the white horizontal wide "line". 通过重新定位绝对y坐标来向上移动gwt应用程序无济于事,因为这样应用程序的顶部被白色水平宽“线”隐藏了。
I have tried and failed: 我尝试过并失败了:

-changed <div> for <span>
-changed margin and padding of body to zero.
-added display:block-inline style


Removing mymenu "fixes" it. 删除mymenu“修复”它。 Also, if gwt application is not embedded, div tag can be influenced. 另外,如果未嵌入gwt应用程序,则div标签可能会受到影响。

Any ideas? 有任何想法吗? T Ť

If it's a structural problem, you fix it by changing HTML elements accordingly. 如果是结构性问题,则可以通过相应地更改HTML元素来解决。 If it's a render problem, you should fix it using CSS. 如果是渲染问题,则应使用CSS进行修复。

It seems that you have a render problem for ie only. 看来您仅存在渲染问题。 I suggest that you put 'mymenu' inside an element (eg: span) and control its appearance through css, either inline or using a style sheet. 我建议您将“ mymenu”放在元素内(例如span),并通过CSS内联或使用样式表来控制其外观。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM