简体   繁体   English

IE下的CSS / HTML ::对齐和按钮问题

[英]CSS/HTML :: alignment and button problem under IE

i have a weird bug on this page when browsing with IE http://www.emfx.fr/?page_id=38 使用IE浏览http://www.emfx.fr/?page_id=38时,我在此页面上有一个奇怪的错误

this image explain clearly the problem : http://appartager.free.fr/site/bugIE.jpg 此图像清楚地说明了问题: http : //appartager.free.fr/site/bugIE.jpg

  • when i look at this page localy(easyPHP) with IE everything is OK 当我用IE浏览此页面localy(easyPHP)时,一切正常
  • when i look at this page online with IE i have 2 problem 1) my hr tag don't align to center 2) the button send message is crop 当我用IE在线查看此页面时,我遇到2个问题1) 我的hr标签未与中心对齐 2) 按钮发送消息已裁剪

BUT the code is exactly the same and the Browser is the same (IE) 但是代码完全相同, 浏览器也相同 (IE)

the hr behavior is control in a css file hr行为是css文件中的控件

hr.center {
    border: none;
    color: #353a40;
    background-color: #353a40;
    height: 1px;
    width: 371px;
    text-align: center;
}

the button is also control by 2 css file (All Browser/IE exception) 按钮也由2个CSS文件控制(所有浏览器/ IE异常)

here is the general code : 这是通用代码

#contact_form input[type=submit] {
padding: 7px 15px;
background: rgba(255,255,255,0.1);
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
font-family: "Droid Sans", Arial;
cursor: pointer;
border: 1px solid #666;
color: #ccc;
margin-bottom: 10px;
margin-left: 420px;
} 

here is the ie exception 这是ie例外

#contact_form input[type=submit] {
    padding: 8px 0px;
    background: rgba(255,255,255,0.1);
    margin-bottom: 300px;
    margin-left: 418px;
    text-align: center;
}

if you guys have any idea on how to solve this it would be great ! 如果你们对如何解决这个问题有任何想法,那就太好了!

cheers ! 欢呼!

sk sk

You've removed the horizontal padding from the button in IE 您已经从IE中的按钮中删除了水平填充

#contact_form input[type=submit] {
    padding: 8px 0px; /* 15px?*/

and I'd personally center a hr using margin:auto instead of using text-align - but hr is aligned to the center by default; 而我个人居中hr使用margin:auto ,而不是使用text-align -但hr对准默认中心; so you shouldn't need to adjust this. 因此您无需调整此设置。

(Taking those declarations out in IE web developer tools appears to resolve the problem). (在IE Web开发人员工具中删除这些声明似乎可以解决该问题)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM