繁体   English   中英

我的(c ++动态生成)页面在ie7中对齐,但在IE8 / Chrome中未对齐?

[英]My (c++ dynamically generated) page aligns in ie7 but is misaligned in IE8/Chrome?

我有一个网页,其中包含一个Javascript文件和一个CSS文件。 该网站在IE7中运行正常,但在IE8中未对齐,所有按钮到处都是。 它通过本机C ++应用程序运行,因此我无法发布指向它的链接。

HTML:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="x-ua-compatible" content="IE=8"/>
<meta name="generator" content="HTML Tidy for Windows (vers 15 August 2007)    www.w3.org" />

<!-- specific scripts --> 
<script type="text/javascript" src="$SOURCE_DIR$/js/care.js"></script>

<script type="text/javascript"> 
var m_criterionJSON = '$CRITERION$';
</script>

<script type="text/javascript">
var content = '$SOURCE_DIR$';
</script>

<!-- debugging tools -->
<!-- <script type='text/javascript' src='https://getfirebug.com/firebug-lite.js'></script> -->

<!-- css files -->
<link rel="stylesheet" type="text/css" href="$SOURCE_DIR$/css/care.css" />
<title></title>
</head>
<body onload="javascript:load();if (_loadTimer) _loadTimer.Stop();">
</body>
</html>

对话的JAVASCRIPT示例:

create: function createDialog(person) {
    this.width = Math.round(Care.body.width() * .7);    
    this.container = $(document.createElement("div"));
    this.container.addClass("dialog-container");

    this.dialog  = $(document.createElement("div"));
    this.dialog.addClass("dialog");

    var html = '<table class="dialog-table">';
    html += this.createTitle();
    html += this.createSelect();
    html += this.createContent(person);
    html += '</table>';
    this.dialog.append(html);

    this.select = $($(this.dialog.children()[0].rows[1].cells[0]).children()[1]);
    this.content = $(this.dialog.children()[0].rows[2].cells[0]);
    this.table = $($(this.content.children()[0]).children()[0]);
    this.createButtons();

    this.container.append(this.dialog);

CSS SNIPET:

.dialog-container {top:0px; z-index:101; position:absolute; height:100%; text-align:center; }
.dialog-table {position:relative; padding:0px; margin: 0px; border:0px;}

悬停图片对话框的图像

固定

固定

固定

只需从顶部删除

<?xml version="1.0" encoding="utf-8"?>

这会导致您的UA在旧版浏览器中进入怪异模式。

暂无
暂无

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

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