代码在Safari,Firefox和Chrome中运行,但不在IE中(对齐)

时间:2013-03-25 14:33:21

标签: javascript html css

我有一个混合了html,css和javascript的代码。显然,这只是我构建的测试页面,用于测试将使用php内容的页面。问题是,代码似乎在IE 6或8上运行良好......我可以理解可能不是IE 6作为它的旧浏览器,但为什么它可以在7,9和10上工作而不是似乎工作8.最后我检查,它工作在7,9,10,但现在可能不会。我不确定它的javascript或css是否会抛弃一切,这就是我寻求帮助并将其发布在多个类别中的原因。

直播网站:http://www.technicallyworship.com/styles/style3/test.php

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

感谢所有yalls提前帮助!我只是在这一点上难以理解,无法弄清楚如何解决它。我知道它在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>

1 个答案:

答案 0 :(得分:1)

问题是您对小图片min-width使用.meSmall属性。 您也应该定义width值。这就是IE没有显示小图像的原因。