我希望页脚能够拉伸,以适应引导程序中的默认container
width
。尽管它位于一行内,而行又位于container
标记内,但它会尽力填充整个屏幕宽度。
如何避免呢?
请在以下位置进行检查:https://codepen.io/jcrr1985/pen/wRKdzL
答案 0 :(得分:1)
您未将页脚放在container
类中,因此可以解决此问题;另外,您应该考虑使用<footer>
标记而不是定义类div
的{{1}}来定义页脚;尝试尽可能使用语义标签
.footer
body{
background-color: #E4E4E4;
}
.navbar-brand{
font-weight: bold;
}
.form-inline input,button{
font-size: 13px!important;
}
.barraNav{
border: 1px solid black;
}
.section1Title{
font-size: 26px;
}
.edit{
background-color: #0066FF;
border: 1px solid #00CCFF;
padding: 5px 8px;
border-radius: 7px;
}
.footer{
padding: 10px;
background-color: #666666;
height: 75px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
}