【css3】floatをしたdivの高さを揃える | さけブロ。♡主にディズニー、htmlやcssなどのメモも♡

さけブロ。♡主にディズニー、htmlやcssなどのメモも♡

自分用htmlやcssなどメモ&身内向け料理日記&ただのディズニーマニア。海外ディズニーが最近好きすぎてヤバイ。WDW、DLR、HKDL、DLP、アウラニ、SHDL訪問済。クルーズも参加済。

親にdisplay: table;
子にdisplay: table-cell;
を指定する。

<div style="display:table; width:100%;">
 <div style="display:table-cell; width:30%; background-color:#fcc;">わお</div>
 <div style="display:table-cell; width:70%; background-color:#cfc;">いえい</div>
</div>

こんな感じ!かんたん!!!



参考URL
http://www.yoheim.net/blog.php?q=20120813