关于DIV左右布局的问题

来源:百度知道 编辑:UC知道 时间:2024/04/29 17:40:14
左右布局
要求:左边3个DIV 右边一个DIV
我的做法:一个大的DIV
在大的DIV里边能左右2个DIV
在左边的DIV里放入3个DIV

可是这时候右边的DIV就跑下边去了 为啥???如果左边放只放2个DIV是可以的,但是放了3个DIV就不行 郁闷啊
哪个大大写个小程序解释下哈,谢谢啦

<!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">
<!--
#main {
float: left;
height: auto;
width: auto;
border: 1px solid #FF0000;
}
#left {
float: left;
height: 400px;
width: 600px;
border: 1px solid #00FF00;
}
#right {
float: right;
height: 400px;
width: 300px;
border: 1px solid #0000FF;
}
.left_div {
border: 1px s