css - 关于父元素div滚动条不正确问题
ringa_lee
ringa_lee 2017-04-17 14:42:02
0
1
1003

有个布局是这样:上面有元素,底部也有元素,底部元素是绝对定位占45px
中间是p>p>table

 <p  style="padding:0 5px;position:relative;width:100%;height:100%;overflow:auto">
    <p class="container" style="position:relative;width:100%;">        
    <table  class="table table-striped table-bordered" >
    ...</table></p><p>
    

table有大量元素,目前情况是,.container撑开了,只比table大一点.最外围的p长度也挺满意的,真的是100%.可出现的滚动条就是滚动不到table最下面的那些元素,ie,firefox均如此,请问该如何解决?

btw:上面的元素会收缩大小所以最外围的p不能绝对定位,否则的话绝对定位设置top,bottom是可以解决的

ringa_lee
ringa_lee

ringa_lee

reply all(1)
Ty80

Because your bottom element has the fixed attribute.
You can set a padding-bottom:45px; attribute for the middle element;
Hope it can help you

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template