2012-05-23 151 views
2

我如何能浮這段文字在這裏: enter image description here浮動文本向右CSS

HTML:

<div id="rightSide"> 
    <legend>Note:</legend> 
    <p> If selecting recurrence please specifiy when the recurrence ends with the Final Date (the last and final date of the event) field.</p> 
</div> 

CSS:

#rightSide { 
    background-color:#eee; 
    width:20em; 
    padding:5px; 
    padding-right:-20em; 
    margin:0 auto; 
    float:right; 
    border:1px solid #CCC; 
    font:normal 12px Arial; 
    color:#666666 
} 
+1

是一個div中'#rightside'與不寬到足以容納他們兩個寬度方向的其他內容? –

回答

1

添加此 「標題」 後,股利和使所有其他潛水,除了「注」div浮動左邊

1

我知道這已被回答,但要th劃出一些我用來做佈局的東西叫做http://960.gs。它將處理必須清除這些浮標,以及將所需的所有東西放置在您想要的地方。

1

使左,右列display:inline-block;vertical-alignment:top;