0

私はTwitterのブートストラップの世界と%ベースの幅に比較的慣れていないため、簡単に達成できるはずのことを非常に混乱させています。

ページに浮かん.subimgでいる左のそれぞれを中央に配置しようとしています。margin:0 auto静的グリッドではないため、明らかに機能しません。親 div のテキスト整列センターを使用しましたが、役に立ちませんでした。私のマークアップは以下のとおりです。

<style>
.subimg{float:left;}
.row-fluid{text-align:center;}
</style>

<div class="row-fluid"><!-- begin row -->
    <div class="span12 subimgstrip">
            <div class="subimg">
                <a href="#">
                    <img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/1.jpg"/>
                    <h6>Customize Settings</h6>
                </a>
            </div>
            <div class="subimg">
                <a href="#">
                        <img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/2.jpg"/>
                        <h6>Set Specific Criteria</h6>
                </a>
            </div>
            <div class="subimg">
                <a href="#">
                        <img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/3.jpg"/>
                        <h6>Customize Alerts</h6>
                </a>
            </div>
            <div class="subimg">
                <a href="#">
                        <img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/4.jpg"/>
                        <h6>Create Antibiograms</h6>
                </a>
            </div>
            <div class="subimg">
                <a href="#">
                        <img src="/wp-content/themes/wordpress-bootstrap/img/products/infection/5.jpg"/>
                        <h6>Isolate Information</h6>
                </a>
            </div>
        </div>
    </div><!-- end row -->
4

1 に答える 1

0

twitter ブートストラップでフローティング コンテンツを中央に配置する最善の方法は、フローティング アイテムに のスタイルをdisplay:inline-block;指定し、親 div に のスタイルを指定することです。text-align:center

于 2013-02-25T16:34:08.273 に答える