これらの行に沿って何かが必要なものを達成するかもしれません。さまざまな部分(a、c、e)に対して絶対的な位置を使用しますが、絶対的に配置されていないdiv内で繰り返すことができます。
'b'セクションは '.rightColumn'の内容で展開されるため、 '.main' divを使用して作成されます。私はあなたが色や画像でそれを埋めるだろうので、そこにコンテンツがないと仮定したので、 'b'の部分の画像などを '.main' divのスタイリングに入れてください。
HTML
<div class="main">
<div class="leftColumnTopCap"></div>
<div class="rightColumn">
<p>Your content here...</p>
</div>
<div class="leftColumnBottomCap"><div>
<div class="rightColumnBottomCap"></div>
</div>
CSS
.main {
/* Any 'b' piece styling goes in here. */
display: block;
float: left;
width: 640px;
margin: 0;
padding: 0 0 100px 0; /* Change 100px to whatever the height of your bottom caps are. */
position: relative; /* We can use relative positioning here. */
}
.rightColumn {
display: block;
float: right;
width: 540px; /* Change to whatever width piece '640px - width of a' is. */
margin: 0;
padding: 0;
}
.leftColumnTopCap {
position: absolute; /* The absolute position here relates to the 'main' div. */
top: 0;
left: 0;
width: 100px; /* Change to whatever width piece 'a' is. */
height: 100px; /* Change to whatever height piece 'a' is. */
}
.leftColumnBottomCap {
position: absolute; /* The absolute position here relates to the 'main' div. */
bottom: 0;
left: 0;
width: 100px; /* Change to whatever width piece 'c' is. */
height: 100px; /* Change to whatever height piece 'c' is. */
}
.rightColumnBottomCap {
position: absolute; /* The absolute position here relates to the 'main' div. */
bottom: 0;
right: 0;
width: 540px; /* Change to whatever width piece '640px - width of a' is. */
height: 540px; /* Change to whatever height piece '640px - width of a' is. */
}
お役に立てば幸いです。
左上隅のピースとボトムキャップのピースを特定の高さに設定するのか、それとも全高のパーセンテージですか? –
高さを設定します。同様に、左の列の幅です。 – Hamster
ご清聴ありがとうございます。また、あなたは何のために 'b'を使用していますか?実際に、あなたが作成しようとしているもののどんなコンテキストも役立つかもしれません。 –