2016-09-18 2 views
-1

私はflexを使って私の要素を整列させます。 #sentinelsは最も外側のコンテナで、div(下の例では緑色)の各行にはクラスlineがあります。行のフレックス要素をどのように揃えるには?

#sentinels { 
    display: flex; 
    flex-direction: column; 
    justify-content: space-around; 
} 
.line { 
    display: flex; 
    flex-direction: row; 
    justify-content: space-around; 
} 

これは

enter image description here

私は希望

が、しかし、列に並んdivを持つことができます:

enter image description here

flexで可能な設定はありますか?

+0

htmlコードも更新できますか? –

+0

@MostafaBaezid:はい、テスト実行のためだけに行数がわからない – WoJ

+0

です。あなたの写真のように –

答えて

関連する問題