2017-08-28 5 views
0

私はいくつかのdivを持っており、テーブルスタイルを作成したいと考えています。div要素のスタイルを設定してテーブルを作成する方法

<div style="display: table;"> 
 
    <div style="display: table-row;"> 
 
    <div style="display: table-cell;"> 
 
     left column 
 
    </div> 
 
    <div style="display: table-cell;"> 
 
     right column 
 
    </div> 
 
    </div> 
 
    <div style="display: table-row;"> 
 
    <div style="display: table-cell;background-color:yellow"> 
 
     one column on this row 
 
    </div> 
 
    </div> 
 
</div>

私たちはcolspan="2"を行うよう、全幅であることを行っている最初の行の2列、2行目の1列を、必要とします。しかし、私たちはスタイルのような何かをすることができますか?

答えて

0

それはディスプレイの制限がある:表 あなたはこれで目的のレイアウトを実現することができない、あなたが仕事を得るか、フラックスを使用することができます。 下記のリンクからご覧になれます

How can display table-row behave like colspan=3

関連する問題