【ボックス】
ボックスの内容
ボックスの内容
.example { padding: 30px 10px; background-color: #ffffff; } /* --- ボックス --- */ .section { width: 298px; /* ボックスの幅 */ background-color: #ffffff; /* ボックスの背景色 */ border: 1px #c0c0c0 solid; /* ボックスの枠線 */ font-size: 80%; /* ボックスの文字サイズ */ } /* --- 見出し --- */ .section h2 { position: relative; /* IE6用 */ width: 3.5em; /* 見出しの幅 */ margin: -0.6em 0 0 5px; /* 見出しのマージン(上右下左) */ background-color: #ffffff; /* 見出しの背景色 */ font-size: 100%; /* 見出しの文字サイズ */ text-align: center; } /* --- ボックス内の段落 --- */ .section p { margin: 1em 10px; /* 段落のマージン(上下、左右) */ }
<div class="example"> <div class="section"> <h2>見出し</h2> <p>【ボックス】</p> <p>ボックスの内容</p> <p>ボックスの内容</p> </div> </div>