日期:2014-05-17  浏览次数:20711 次

新手,IE6 IE7 无法居中的问题
这是代码部分:
<div class="hot">
  <div class="hotline"> <strong>热门商品</strong></div>
  <div class="hotgoods">
  <div class="buttonl"><img src="img/0Q(8CX]~JM(4}7{7{4ET2$0.jpg" width="26" height="37" /></div>
  <div class="content">此处显示 class "content" 的内容</div>
  <div class="buttonr">此处显示 class "buttonr" 的内容</div>
  </div>
</div>

这是样式部分:
.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不能居中,请教各位,帮帮忙···

------解决方案--------------------
<div class="hot" align=center>
------解决方案--------------------
这个是HTML里面的注释 还是CSS里面的注释 如果说是HTML的就没问题。。是CSS得话 就错了。这个注释方式就会有问题。 改成/*热门商品*/这才是CSS的