+ -
当前位置:首页 → 问答吧 → IE缩小网页后,浮动层乱了。怎么解决?

IE缩小网页后,浮动层乱了。怎么解决?

时间:2011-03-22

来源:互联网

比如:HTML code

<div class="container">
  <div class="left"></div>
  <div class="ritgh"></div>
</div>


CSS code

.container{
  margin:0 auto;
  width:980px;
  height:800px;
}
.left{
  float:left;
  width:300px;
  height:500px
}
.right{
  float:left;
  margin-left:10px;
  width:670px;
  height:500px
}


如上段代码,缩小网页一定百分比后右边的DIV跑到左边的DIV下面了。

这种浮动问题怎么解决?腾讯的网页99%都不会在缩小网页后乱了。怎么处理的?
求高手- -,

作者: parcool   发布时间: 2011-03-22

我这看是好的

作者: athrunzero   发布时间: 2011-03-22

引用 1 楼 athrunzero 的回复:
我这看是好的

...
你缩小网页没?不是拖小窗口,是点右下角的百分比缩小(IE8,或者用CTRL+鼠标滚轮)

作者: parcool   发布时间: 2011-03-22

一般页面所有标签 高度宽度 设置百分比的话 放大缩小 对布局影响不大

作者: KK3K2005   发布时间: 2011-03-22

引用 2 楼 parcool 的回复:
引用 1 楼 athrunzero 的回复:
我这看是好的

...
你缩小网页没?不是拖小窗口,是点右下角的百分比缩小(IE8,或者用CTRL+鼠标滚轮)

是啊 百分比缩小 我这看是好的

作者: athrunzero   发布时间: 2011-03-22

没看出什么异样,就这些代码吗?

作者: missgd152   发布时间: 2011-03-22

引用 5 楼 missgd152 的回复:
没看出什么异样,就这些代码吗?


不好意思,在CSDN上手打的,单词写错了,从新改一下:
HTML code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.container{
  margin:0 auto;
  width:980px;
  height:800px;
  border:#CCC solid 1px;
}
.left{
  float:left;
  width:300px;
  height:500px;
  border:#CCC solid 1px;
}
.right{
  float:left;
  margin-left:10px;
  width:666px;
  height:500px;
  border:#CCC solid 1px;
}
-->
</style>
</head>

<body>
<div class="container">
  <div class="left"></div>
  <div class="right"></div>
</div>
</body>
</html>


作者: parcool   发布时间: 2011-03-22

浮动层 在你的 窗口 不够时候 乱了是肯定的

你可以通过 div+ css的外部嵌套 解决 有效的 排序

作者: fengyarongaa   发布时间: 2011-03-22

引用 7 楼 fengyarongaa 的回复:
浮动层 在你的 窗口 不够时候 乱了是肯定的

你可以通过 div+ css的外部嵌套 解决 有效的 排序

大侠 说清楚点,比如我上面那个代码 怎么改???

作者: parcool   发布时间: 2011-03-22

热门下载

更多