我必须删除浮动:左起:
.Container70 {
float: left;
width: 70%;
}
如果内容大于整个页面,则我的页脚位于页面中间。
这是我整个CSS代码:
<head>
<body>
<div id="container-wrapper">
<form id="topForm" enctype="application/x-www-form-urlencoded" action="/gixxshare/Testewr" method="post" name="topForm">
<div id="layout-topbar-cover-custom">
<div id="layout-portlets-cover-custom">
<div class="Responsive100 Container70">
<div class="ContainerIndent">
<div class="Card ShadowEffect HeiAutoOnMobile">
</div>
</div>
</div>
</div>
<div id="layout-footer">Test</div>
</div>
#container-wrapper {
min-height: 100%;
position:relative;
}
@media ( min-width : 960px) {
#layout-topbar-cover-custom {
box-sizing: border-box;
padding: 0 3rem;
position: relative;
top: 0;
width: 100%;
z-index: 999;
}
}
@media ( max-width : 960px) {
#layout-topbar-cover-custom {
box-sizing: border-box;
position: relative;
top: 0;
width: 100%;
z-index: 999;
}
}
#layout-portlets-cover-custom {
display: block;
padding: 70px 10px 30px 0.1%;
vertical-align: top;
box-sizing: border-box;
display: block;
height: auto;
width: 100%;
padding-bottom:100px;
}
#layout-footer {
background: #333333;
width: 100%;
height: 100px;
position: absolute;
bottom: 0;
left: 0;
}
.Container70 {
float: left;
width: 70%;
}
.Responsive100 {
}
.ContainerIndent {
display: block;
margin: 0 auto;
padding: 10px;
}
#layout-portlets-cover::before, #layout-portlets-cover::after, .Card::before, .Card::after {
border-collapse: collapse;
content: "";
display: table;
}
#layout-portlets-cover::after, .Card::after {
clear: both;
}
#layout-portlets-cover::before, #layout-portlets-cover::after, .Card::before, .Card::after {
border-collapse: collapse;
content: "";
display: table;
}
.ShadowEffect {
box-shadow: 0 1px 2px 0 rgba(43, 59, 93, 0.4);
}
.Card {
background-color: #ffffff;
border-radius: 2px;
color: #546e7a;
display: block;
font-family: "roboto_condensedregular";
padding: 10px;
}
.HeiAutoOnMobile {
}
我不想从Container中删除float:left因为这是来自bootstrap的类,这意味着我必须调整所有容器。 我怎么解决这个问题?有什么想法吗?