首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 其他开发语言 >

IE6 IE7 无法居中的有关问题

2012-03-25 
IE6 IE7 无法居中的问题div classhotdiv classhotline strong热门商品/strong/divdiv cl

IE6 IE7 无法居中的问题
<div class="hot">
  <div class="hotline"> <strong>热门商品</strong></div>
  <div class="hotgoods">
  <div class="buttonl"><img src="img/.jpg" width="26" height="37" /></div>
  <div class="content">此处显示 class "content" 的内容</div>
  <div class="buttonr">此处显示 class "buttonr" 的内容</div>
  </div>
</div>
这是css样式
.hot{ width:1003px; height:200px; margin:0 auto; overflow:hidden;}
 .hotline{ width:18px; float:left; height:100px; padding-left:7px; padding-right:7px; line-height:25px; font-size:16px; font-family:" 黑体"; padding-top:50px; padding-bottom:50px; background:##f7f7f7; color: #639c00;; }
 .hotgoods{ width:971px; height:200px; float:right;}
 .buttonl{ width:32px; height:110px; float:left; padding-top:80px; padding-left:5px; }
  
在IE8 和火狐都是居中的状态 在IE6和IE7无法居中,不知道什么原因

[解决办法]
用text-align,要是还不行的话直接<center>就好了

热点排行