1

我制作了一些 div 来制作按钮,但是其中一些 div 在 IE 中是不可见的。在其他浏览器中,这很完美,只是在 IE 中不行。有人说删除浏览器缓存就够了。我这样做了,但没有效果。我不知道我做错了什么。这是关于这两个div的:

    <div id="searchButtons">
        <!--Inside are the buttons, which are div's that are clickable using a hyperlink-->
        <a href="#" onclick="javascript:document.getElementById('SearchForm').submit();"><div id="searchButton" class="searchButton" style="width:70;">
            Search
        </div></a>
        <a href="#" onclick="javascript:document.getElementById('SearchForm').reset();"><div id="resetButton" class="searchButton" style="width:70; left:70;">
            Reset
        </div></a>
    </div>

    <div id="loginButtons">
        <a href="#" onclick="CheckLoginData(2)"><div id="LoginButton" class="loginButton" style="width:60;">
        <!--CheckLoginData(2) is a function, which checks if al inputs are entered, the parameter (2) has to do with the tabs I made in another part of this file-->
            Login
        </div></a>
        <a href="Register.php"><div id="Register" class="loginButton" style="left:60; width:70;">
            Register
        </div></a><br/>
        <a href="ForgotPassword.php" target="_blank">Forgot password</a>
    </div>

在第一个 div 之前,有一个使用此 div 提交的表单。

第二个 div 包含一些用于登录、注册或转到忘记密码页面的按钮。这些 div 有一些 css:

div.loginButton,div.searchButton{
position:absolute;
color:blue;
background-color:FFFF99;
height:20;
transition:background-color 0.2s;
-webkit-transition:background-color 0.2s,transform 0.2s;
}
div.loginButton:hover,div.searchButton:hover{
position:absolute;
background-color:CCCC7A;
height:20;
transition:background-color 0.2s;
-webkit-transition:background-color 0.2s,transform 0.2s;
}
#loginButtons,#searchButtons{
position:absolute;
top:130;
height:25;
left:20;
width:140;
}

奇怪的是,只有每个 div 内的第一个超链接是不可见的。其他的都是可见的。我曾尝试使用样式属性显示,但没有效果。我不知道我做错了什么。有什么建议吗?

4

1 回答 1

3

将该代码直接插入空白页面,由于绝对定位,链接彼此重叠。删除绝对定位,您的所有链接都应该可见。

于 2013-10-18T11:46:30.533 回答