0

希望有人可以建议

让我的页脚换行在横向模式下(480 像素)的平板电脑设备上重复出现问题

HTML

<div id="footer-wrap">
    <footer class="footer-inner">
        <section class="foo1">
            <h1>Get in Touch</h1>
            <hr>
        </section>
    </footer>
</div>

CSS

#footer-wrap {
  background: none repeat #373737;
  min-height: 400px; }

.footer-inner {
  width: 940px;
  margin: 0 auto; }

在我的头脑中

最初我没有在媒体查询中定位#footer-wrap,因为我认为它只包含 BG 颜色而没有其他属性,从主样式表中提取就足够了

我尝试在媒体查询中添加

@media only screen and (min-width: 480px) and (max-width: 767px){

    #footer-wrap {
            width: 100%; /*with the intention of just filling the div*/
         }
    }

也试过

#footer-wrap {
        width:767px;
    background: none repeat #373737;
     }

两者都没有工作

任何人都可以建议,我相信答案在我的眼睛之间,但我无法为我的生活弄清楚,因为它是我在这个项目上落后

提前谢谢了

约翰

4

2 回答 2

0

在媒体查询中:-

@media (max-width: 767px){

#footer-wrap{

margin-left: -20px;
margin-right: -20px;

} }

于 2013-02-13T15:22:32.853 回答
0

我想我可以补充一下这是如何完全解决的,如果不是为了关闭,但也许可以帮助其他人

页脚容器需要最小宽度 100%

这就是全部...... 3 小时,这就是它所需要的一切

可能会帮助像我一样困惑的其他人

问题完全解决

R

约翰

于 2013-02-14T12:33:18.053 回答