在內容排版上以前是在左上角放置廣告後,內容跟隨到廣告下面,這次希望左右分開,不要跟隨到廣告下面,因為數據比較短,跟隨到下面不留意發現,於是用到了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=utf-8" />
<title>exhibitor114</title>
<style type="text/css">
<!--
#exhibitor114{ margin:0 auto;width:auto;height:100%}
#exhibitorleft{ float:left; width:44%; height:100%; background:#eeeeee}
#exhibitorright{ float:left; width:56%;height:100%;}
-->
</style>
</head>
<body>
<div id="exhibitor114" style="float:inherit">
<div id="exhibitorleft">左側</div>
<div id="exhibitorright">右側</div>
</div>
</body>
</html>