开发者

CSS float and pagination positioning

I have the following markup

<div id="hearingSummary">
    <table class="minit开发者_StackOverflowable">
        ... content removed for brevity
    </table>

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

Classes .paginationLeft and .paginationRight have the following CSS associated

.paginationLeft
{
    float:left;
}

.paginationRight
{
    float: right;
}

I wish to position absolutely the DIV that contains the pagination element to be always at the bottom of its container so I changed it to

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

But the SPAN elements now does not float as specified in the CSS classes. What is the best way to solve this?


You need to give your absolute positioned element a width.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜