在引导程序中遇到页脚问题

时间:2021-06-25 21:10:52

So I made this basic page, but problem is that whatever I do with footer, the text is not centered, and also it's not fixed, when I change the height of my browser, it moves around.

所以我创建了这个基本页面,但问题是无论我用页脚做什么,文本都没有居中,而且它也不固定,当我改变浏览器的高度时,它会移动。

Here's the code and preview: http://bootsnipp.com/user/snippets/2nnyr

这是代码和预览:http://bootsnipp.com/user/snippets/2nnyr

2 个解决方案

#1


1  

You might find it easier to place a row within your container and a col with an offset-2 and remove pull-right. Hope this helps see below.

您可能会发现在容器中放置一行更容易,并且使用offset-2放置一个col并删除pull-right。希望这有助于在下面看到。

<footer class="footer">
    <div class="container text-center">
        <hr>
        <div class="col-lg-12">
            <div class="col-md-8">
                <p class="footertext pull-right">© 2016 *******. All rights reserved</p>
            </div>
        </div>
    </div>
</footer>

#2


0  

To center the text, change the text-align from left to center in your media query:

要使文本居中,请在媒体查询中将文本对齐从左到中更改为:

@media (min-width: 768px) {
    .bs-footer {
        text-align: center;
    }
}

#1


1  

You might find it easier to place a row within your container and a col with an offset-2 and remove pull-right. Hope this helps see below.

您可能会发现在容器中放置一行更容易,并且使用offset-2放置一个col并删除pull-right。希望这有助于在下面看到。

<footer class="footer">
    <div class="container text-center">
        <hr>
        <div class="col-lg-12">
            <div class="col-md-8">
                <p class="footertext pull-right">© 2016 *******. All rights reserved</p>
            </div>
        </div>
    </div>
</footer>

#2


0  

To center the text, change the text-align from left to center in your media query:

要使文本居中,请在媒体查询中将文本对齐从左到中更改为:

@media (min-width: 768px) {
    .bs-footer {
        text-align: center;
    }
}