复制代码
代码如下:
<!DOCTY PE ht ML P ub LIC "-//W3C//DTD XHTML 1.0 Trans IT ional//EN" "http://www.w3. org /TR/xhtml1/DTD/xhtml1 -t ransitional.dtd">
<html XM lns="http://www.w3.org/1999/xhtml">
<head>
< ;m eta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<style type="text/css">
# side {
background-color: #00CC66;
float: left;
h ei ght: 300px;
width: 120px;
}
#main {
background-color: #CC6633;
height: 300px;
width: 70px;
m arg in-left:122px;
}
#content {
width: 470px;
mar gin -right: auto;
margin-left: auto;
}
</style>
</head>
<body>
<div id="content">
<div id="side">此处显示 id "layout" 的内容</div>
<div id ="main">cichu</div>
</div>
</body>
</html>
总结
以上是 为你收集整理的 div的两列居中放置并对每个div设计css样式 全部内容,希望文章能够帮你解决 div的两列居中放置并对每个div设计css样式 所遇到的问题。
如果觉得 网站内容还不错, 推荐好友。
查看更多关于div的两列居中放置并对每个div设计css样式的详细内容...