【发布时间】:2011-04-28 00:06:28
【问题描述】:
我有一个这样创建的按钮:
<div id = "userForgot">
<!-- Back button used -->
<button id = "forgotGoBack" onclick = "backToPage()" >< Back</button>
<!-- Form used to submit all membership info to be used on server -->
<form id = "ForgotForm" action = "/" onclick = "formURL(this)" method = "post" >
我无法让它在 IE 7 上显示。这是唯一不会显示的项目。我可以找到按钮(如果我滚动到它应该在的位置,我会得到一个指针,如果我点击它应该在的位置,它就可以工作。这是我的css,它用于除 IE 7 之外的所有版本:
/*
* The back button for the page
*/
#forgotGoBack
{
z-index: 500;
color: #fbfbfb;
font-family: Arial;
font-size: 11px;
position: absolute;
top: 400px;
left: 305px;
border: 0;
padding: 0;
background-color: transparent;
}
#forgotGoBack:hover
{
cursor: pointer;
}
这是我仅通过此命令用于 IE 7 的代码:
<!--[if IE 7]><link rel="stylesheet" href="Styles/DefaultStyleForIE7.css" type="text/css" media="screen, projection"/><![endif]-->
/* Made back button visible */
#forgotGoBack
{
z-index: 300;
position: relative;
color: Red;
left: 0px;
top: 0px;
display: block;
}
我将color 设为红色,因为它会突出显示在我的页面上并且我可以更容易地看到它。我还尝试使用left 和top 调用将其移动到不同的位置。我尝试使用position: relative 调用,因为我读到它在某些情况下修复了我遇到的 IE 7 问题。无论css 我添加到IE 7 代码中,按钮都不会移动。我还向按住按钮的div 添加了代码,希望这就是问题所在。
#userForgot
{
z-index: 200;
}
有什么建议吗?
【问题讨论】:
标签: css internet-explorer internet-explorer-7