html - CSS/HTML IE 7 问题

标签 html css internet-explorer-7

我在 IE 7 中无法正常工作,但在所有其他浏览器中都可以正常工作,但是如果你看一下 http://jamessuske.com/thornwood2/在 IE 7 中,您会注意到 topCotent 和 contentArea 之间的两个间隙以及 contentArea 和 contentBottom 之间的另一个间隙。

不知道如何解决这个问题。

HTML代码

<div class="topContent">
<img src="images/top.gif" width="1009" height="37" border="0" />
</div><!--topContent-->

<div class="leftContent">
<img src="images/leftSide.gif" width="48" height="494" border="0" />
</div><!--leftContent-->

<div class="contentArea">

</div><!--contentArea-->

<div class="rightContent">
<img src="images/rightSide.gif" width="49" height="494" border="0" />
</div><!--rightContent-->

<div class="bottomContent">
<img src="images/bottom.gif" width="1009" height="39" border="0" />
</div><!--bottomContent-->

CSS 代码

.topContent{
width:1009px;
}

.leftContent{
float:left;
}

.contentArea{
background:#FFF;
width:912px;
min-height:494px;
float:left;
}

.rightContent{
float:right;
}

.bottomContent{
width:1009px;
}

最佳答案

如下所示将高度添加到类中,这将解决您的 IE7 问题

.topContent{
  width:1009px;
  *height:37px;
}

.leftContent{
  float:left;
  *height:494px;
}


.rightContent{
  float:right;
  *height:494px;
}

关于html - CSS/HTML IE 7 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7919727/

相关文章:

css - Border-radius 不完全适用于简单的水平导航按钮......

javascript - 将与一个元素的 ID 关联的 CSS 应用于另一个元素

javascript - image#.href 在 ie7 中一直失败。这是为什么?

HTML - 如何调用这样的显示?

css - 为什么在使用媒体查询时我的网格元素没有堆叠在一起?

html - 在 CSS 无序列表中使自定义元素符号可点击

html - IE7 中的偏移量使 div 未对齐

css - IE7 在带有 bg img 的 div 中显示背景颜色,尽管声明为 'transparent'

php - AJAX脚本删除表头

html - 使 Div 宽度响应