divを横に並べる - absolute
<html> <head> <title>css absolute</title> <style type="text/css"> div.divClass01{ border : 1px #000000 solid; width : 50%; position : absolute; left : 0px; top : 0px; } div.divClass02{ border : 1px #000000 solid; width : 50%; position : absolute; left : 50%; top : 0px; } </style> </head> <body> <div class="divClass01"> <h1>title</h1> <p align="center">paragraph</p> test1 </div> <div class="divClass02"> <h1>title</h1> <p align="center">paragraph</p> test2 </div> </body> </html>
ポイントは「position」を「absolute(絶対座標)」にする事と、「divClass02」の「left」位置を、ピクセル指定ではなく「50%」と指定する事。
IEだとぴったりくっつかないなぁ。