DIV左右行

View Code 
 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <title>无标题文档</title>
 6 <style>
 7    #left{min-height:400px;width:200px;float:left;border:solid 1px #ccc;}
 8     #center{min-height:400px;margin:0px 0px 0px 210px;border:solid 1px #ccc;}
 9 </style>
10 </head>
11 
12 
13 <body>
14  <div style="border:solid 1px #ccc;">
15    <p>testtesasdsadfasfsadfttest</p>
16    <p>sdfgsdfg</p>
17    <p>sadf</p>
18  </div>
19    <div id="left">
20      <p>ddd   </p>
21      <p>&nbsp;</p>
22      <p>&nbsp;</p>
23      <p>edt</p>
24      <p>dsfgs  </p>
25      <p>trff</p>
26    </div>  
27    <div id="center">
28      <p>asdfasfd
29        dfgd</p>
30      <p>&nbsp;</p>
31      <p>dsfgsdfg</p>
32      <p>&nbsp;</p>
33      <p>&nbsp;</p>
34      <p>sdfgsdgfsd</p>
35    </div>
36  <div style="border:solid 1px #ccc;">
37    <p>testtesttest</p>
38    <p>&nbsp;</p>
39    <p>dsfgsdgf</p>
40    <p>dsfgsdfg</p>
41  </div>
42 </body>
43 </html
原文地址:https://www.cnblogs.com/cnaspnet/p/2103096.html