简体   繁体   English

Internet Explorer 7 CSS宽度100%问题

[英]internet explorer 7 css width 100% problem

How can I fix this... 我怎样才能解决这个问题...

Here is my screen on IE7 这是我在IE7上的屏幕 IE7上的屏幕

And here it is on IE8 这是在IE8上 IE8上的屏幕

My css code here is.. 我的CSS代码在这里..

#content{
    font-family:Arial;
    width: 100%;
    min-height: 5em;
    display: table-cell;
    /*vertical-align: middle;*/
    text-align: center;
}

#main_content{
    font-family:Arial;
    position: absolute;
    width: 90%;
    background-color: #f8f8f8; 
  left: 50%;
  margin-left: -45%;
    padding-bottom: 5%;
}

#main_content table{
    font-family:Arial;
    width: inherit;
    border:solid thin #dedede;
    border-spacing: 0;
    border-collapse:collapse;
    text-align:left;
    /*margin-bottom: 5%;*/
    padding-left: 2px;
}

#main_content table tr td{
    font-family:Arial;
    border:solid thin #dedede;
    background-color: #ffffff;
    border-spacing: 0;
    border-collapse:collapse;
    padding:0;
    text-align:left;
    padding-left: 2px;
}

#main_content table tr td input, #main_content table tr td select, #main_content table tr td textarea{
    font-family:Arial;
    width:94%;
    text-align:left;
    border: none;
    margin:0 auto;
    padding: 2% 2% 2% 2%;
}

#main_content table tr td select{
    font-family:Arial;
    width:100%;
}

Sorry about the lengthy post, It's just I've been stuck here for a long time..hehehe 很抱歉,冗长的帖子,只是我已经在这里待了很长时间了..hehehe

I ended up using Hacks thanks to @My Head Hurts. 由于@My Head Hurts,我最终使用Hacks。 And also I'll try his suggestion of using asterisk(*) for IE7 css. 而且,我还将尝试他对IE7 CSS使用星号(*)的建议。

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

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