Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 1.04 KB

2017.2.22.md

File metadata and controls

41 lines (36 loc) · 1.04 KB

方法之一:

.parent{
	padding: ;
}
.child{
	margin: 0 auto;
	display: block;
	width: ;
	height: ;
}
  • footer置底 1.Have a <div> with class="wrapper" for your content 2。Right before the closing of the wrapper place the <div class="push"></div> 3.Right after the closing of the wrapper place the <div class="footer"></div>
* {
    margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}