开发者

CSS float and pagination positioning

开发者 https://www.devze.com 2023-01-29 12:31 出处:网络
I have the following markup <div id=\"hearingSummary\"> <table class=\"minit开发者_StackOverflowable\">

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

精彩评论

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