0

所以,我有这个代码

<div class="featurette">
            <img class="featurette-image pull-right" src="img/BreadBakersGuildLogo.jpg">
            <div class="text-center">
                <h2>Justin</h2>
                <p class="lead">
                    Stuff about Justin
                </p>
            </div>
            <div class="pull-left">
                <ul>
                    <li>Stuff about contacts</li>
                    <li>Stuff</li>
                </ul>
            </div>
        </div>

不幸的是, text-center 下的文本没有居中。它似乎向左一点。我也做了这个小提琴来证明我的意思。

谢谢!

4

1 回答 1

3

问题是:

您正在使用.containerfor <body>which has awidth: 940pxphas adisplay: block并且它正在参考 940px 进行渲染。

一种解决方案是使用.container{ width: 100%},因为您稍后也可能会遇到此问题。

于 2013-05-23T17:33:05.400 回答