如下代码显示结果是图片这种的结构,sub1与sub2是要把right分为两列的,请问是哪里出错了?

http://img.mukewang.com/57b4a07b00016a4907980749.jpg

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 T">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html charset=utf-8">

<title>混合布局</title>

<style type="text/css">

body{margin: 0;padding: 0;font-size: 30px}

div{text-align: center;font-weight:bold;}

.head{height: 100px;background: #CCC}

.main{width: 800px;height: 600px;margin: 0 auto; background: #FCC}

.left{width: 200px;height: 600px;background: yellow;float: left;}

.right{width: 600px;height: 600px;background: blue;float: right;}

.sub1{width: 400px;height: 600px;background: green; float: left;}

.sub2{width: 200px;height: 600px;background: #09F; float: right;}

.footer{width: 800px;height: 50px; margin: 0 auto;background: #9CF;float: none;}

</style>

</head>

<body>

<div class="head">head</div>

<div class="main">

    <div class="left">left

    </div>

    <div class="right">right

      <div class="sub1">sub1</div>

      <div class="sub2">sub2</div>

    </div>

</div>

<div class="footer">footer</div>


</body>

</html>


慕粉1470496929
浏览 1615回答 2
2回答

霜见

是right那个文本把sub2顶下去了
打开App,查看更多内容
随时随地看视频慕课网APP