在Safari, Firefox和Chrome中工作的代码,但不能在IE(对齐)中工作

Code working in Safari, Firefox, and Chrome, but not in IE (Alignment)

本文关键字:工作 IE 对齐 但不能 Chrome Safari Firefox 代码      更新时间:2023-09-26

我有一个代码,有html, css和javascript的混合。显然,这只是一个测试页面,我建立了一个测试页面,将与php内容的工作。问题是,代码似乎不能很好地工作在ie6或ie8…我可能不能理解ie6,因为它是一个老浏览器,但为什么它可以在7、9和10上工作,而不是在8上工作。据我所知,它在7、9、10号的时候是有效的,但现在可能不行了。我不确定是否它的javascript或css抛出一切,这就是为什么我寻求帮助,并在多个类别发布它。

Live Site: http://www.technicallyworship.com/styles/style3/test.php

JSFiddle: http://jsfiddle.net/qu5Vc/

提前感谢所有人的帮助!我只是在这一点上被难住了,不知道如何解决它。我知道一个事实,它的工作方式,我想要它在Safari和Chrome(所以这可能会给你一个参考点)。我也包括下面所有这些代码。

<style>
/* Syle 3 CSS Document */
.clear { clear: left; }
#style3 { width: 750px;}
#s3_left { 
width: 750px;
}
#s3_right { 
    float: right;
    padding: 10px;
}


    .meDiv
    {
        position:relative;
        border:1px solid black;
        max-width: 400px;
    }
    .meSmall
    {
        display:block;
        max-width: 400px; border: 2px solid #000;
    }
    .meBig
    {
        z-index:10;
        position:absolute;
        left:0px;
        top:0px;
        display:none;
        max-width: 700px;
        border: 2px solid #000;
    }
    #bigOne { max-width: 700px; max-height 800px;}
</style>
<script>
function Big() {
    document.getElementById('bigOne').style.display = "block";
}
function Small() {
    document.getElementById('bigOne').style.display = "none";
}
</script>

<h1>Testing this out</h1>
<div id="style3">
<div id="s3_left">
<div id="s3_right">
<div class="meDiv">
    <img class="meSmall" src="http://openwalls.com/image/399/explosion_of_colors_1920x1200.jpg" onmouseover="Big();" style="align: right;" />
    <img id="bigOne" class="meBig" src="http://openwalls.com/image/399/explosion_of_colors_1920x1200.jpg" onclick="Small();" onmouseout="Small();" />
</div>
</div>  <!-- s3_right -->
This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content.This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. This is test content. 
</div>  <!-- s3_left -->
</div>  <!-- style 3 -->
<div class="clear"></div>

问题是您正在使用min-width属性的小pic (.meSmall)。你也应该定义width值。