[英]Background appearing outside of the Fieldset's border in IE8
I have been working on doing CSS hacks to make things work in Internet explorer 7 and 8 that normally work in Chrome/Firefox. 我一直在进行CSS黑客攻击,以使事情在通常在Chrome / Firefox中正常工作的Internet Explorer 7和Internet Explorer 8中正常工作。 I have fixed most of the issues but I can't figure this one out and I was hoping for some help.
我已经解决了大多数问题,但我无法解决这个问题,希望能有所帮助。
Here is how my login box looks normally: 这是我的登录框正常显示的样子:
And here is how it looks in IE 8: 这就是它在IE 8中的外观:
Id like to get them looking the same, but at a minimum fix how the color goes past the border. 我想让它们看起来一样,但至少要解决颜色如何越过边界的问题。 Any thoughts?
有什么想法吗?
Edit: 编辑:
here is the html/server control that renders the login box: 这是呈现登录框的html / server控件:
<form>
<fieldset style="width: 20" align="center" id="login_border">
<legend id="login_box">Login</legend>
<asp:Login ID="Login1" runat="server"
TitleText="">
</asp:Login>
</fieldset>
</form>
Here is the CSS: 这是CSS:
#login_border
{
Border: 0.25em black solid;
margin-left: 1em;
padding: 0.2em 0.8em;
background-color: #fdbe12;
position: fixed;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -142px;
}
#login_box
{
Border: 0.1em black solid;
margin-left: 1em;
padding: 0.2em 0.8em;
background-color: White;
font-size: 1.5em;
}
.login
{
font-size: 1.1em;
font-weight: bold;
}
You can try to give negative margin-top to legend and this will get fixed. 您可以尝试给图例设置负的页边距,这将得到解决。
*margin-top:-22px; //for IE7
margin-top:-22px\0/; //for IE8, Note `\0/` characters here.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.