css how to make this div at the bottom of another div
This question already has an answer here:
You can use position: absolute; bottom: 0px; position: absolute; bottom: 0px; and position: relative; on its container.
Demo
.bottom {
position: absolute;
bottom: 0px;
}
However the absolutely positioned div will not expand the height of its container and will overlap other content if the height is too small.
Using relative positioning moves it x [unit] from its original position. Setting
position: relative;
bottom: 0;
will move it 0 [unit] upwards from the bottom.
DEMO HERE
you just need to add 2 rules.
.slNewClass {
position: absolute;
bottom:0 ;
}
.mainTable {
position: relative;
}
DEMO
Do the following:
.slNewClass div to position: absolute; & bottom: 0px; .mainTable div box-sizing: to border-box then add add padding bottom like this padding-bottom: 130px; Note: Bottom padding should be the same as bottom div height + some extra pixels for breathing space.
链接地址: http://www.djcxy.com/p/75782.html