+ -
当前位置:首页 → 问答吧 → 为什么MainOut框架会被内缩呢?

为什么MainOut框架会被内缩呢?

时间:2011-09-04

来源:互联网

发现#Language定义margin-top后整个外框被内缩了,而#Language却没有相对于#MainIn这个外框进行内缩,为什么呢?
还有..那个h1左浮云后,下一个div不是紧靠它右边的么,为什么那个form会离得那么远呢?


<!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=utf-8" />
<title>无标题文档</title>
<style>
body{
padding:0px;
}

#MainOut{

margin-top:0px;
}

#MainIn {
height: 768px;
width: 1024px;
background-color: #CCC;
margin-left:auto;
margin-right:auto;
text-align:center;
}
#MainIn #Language {
margin-top: 25px;

}

</style>
</head>

<body>
<div id="MainOut">
  <div id="MainIn">
  <h1 style="display:block; float:left; text-indent: 20px; margin-top: 10px;">安装程序</h1>
  <div id="Language">
  <form class="languages" action="#">
  <select class="SelLanguages" value="中文">
  <option class="language">English</option>
  <option class="language">中文</option>
  </select>
  </form>
  </div>
  <div class="Content">

  </div>
  </div>
</div>
</body>
</html>

作者: kk86868058   发布时间: 2011-09-04

老大,你的css基础也。。。

作者: BLUE_LG   发布时间: 2011-09-04

热门下载

更多