2011-02-07 77 views

回答

4

你試過嗎? { float:right }

+0

最快的地步。謝謝〜 – lkahtz 2011-02-07 17:24:53

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 } 
相關問題