2011-02-07 16 views

答えて

4

これを試しましたか? { float:right }

+0

迅速かつポイントに。ありがとう〜 – lkahtz

5

CSS

.div1 { overflow: hidden; width: 500px; } /* this will clear your float. width given for example purposes */ 
.div2 { float: right; width: 200px; } 

HTML

<div class="div1"> 
    <div class="div2"> 
    <p>div 2 contents</p> 
    </div> 
    <p>div 1 contents</p> 
</div> 
4

あなたはそれがブロック表示と静的な位置を保持していたい場合:

.inner { width: ##px, margin-left: auto; margin-right: 0 } 
関連する問題