[新着] Webテンプレートを仮オープンしました
<div id="inbox"> <div id="wrap"> <div id="main"></div> <div id="navi1"></div> </div> <div id="navi2"> </div>となっており、(汚くてお恥ずかしいですが)スタイルシートは
body {
margin:0;
padding:0;
width:100%;
height:100%;
color:#000;
background:#e4eff5;
font-size:12px;
line-height:160%;
text-align: center;
}
#inbox {
width: 780px; /* #wrap + #navi2 */
background:#e4eff5;
}
#wrap {
float:left;
width:700px; /* #navi1 + #main +20 */
background:#e4eff5;
text-align: left;
}
#main {
float:right;
width:500px;
background:#fff;
margin:0;
padding:0;
}
#navi1 {
float:left;
width:180px;
line-height:160%;
padding:20px 0 0 0;
margin:0;
color:#ccc;
background:#000;
}
#navi2 {
float:right;
width:80px;
background:#e4eff5;
padding:0;
margin:0;
line-height:180%;
text-align: center;
overflow:hidden;
}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
<title>サンプル</title>
<style type="">
#test1{
width: 780px;
background:#e4eff5;
text-align: center;
}
#test2{
width: 780px;
background:#e4eff5;
margin-left: auto;
margin-right: auto;
}
#test3{
width: 780px;
background:#e4eff5;
text-align: center;
margin-left: auto;
margin-right: auto;
}
</style>
<head>
<body>
<div id="test1">
<p>このブロックそのものはセンタリングされませんが、内容テキストはセンタリングされます。</p>
</div>
<div id="test2">
<p>このブロックそのものはセンタリングされますが、内容テキストはセンタリングされません。</p>
</div>
<div id="test3">
<p>このブロックそのものも内容テキストもセンタリングされます。</p>
</div>
</body>
</html>