2010-12-07 19 views
0

我有以下標記CSS的float和分頁定位

<div id="hearingSummary"> 
    <table class="minitable"> 
     ... content removed for brevity 
    </table> 

    <div> 
     <div class="pagination"> 
      <span class="paginationLeft">left text</span> 
      <span class="paginationRight">right text</span> 
     </div> 
    </div> 
</div> 

.paginationLeft.paginationRight有以下CSS相關

.paginationLeft 
{ 
    float:left; 
} 

.paginationRight 
{ 
    float: right; 
} 

我想絕對定位包含分頁元素是DIV總是在它的容器底部,所以我將它改爲

<div style="position:absolute; bottom: 3px;"> 
    <div class="pagination"> 
     <span class="paginationLeft">left text</span> 
     <span class="paginationRight">right text</span> 
    </div> 
</div> 

SPAN元素現在不像CSS類中指定的那樣浮動。解決這個問題的最好方法是什麼?

回答

1

你需要給你的絕對定位元素的寬度。