HTML/CSS set div to height of sibling

后端 未结 10 2171
南旧
南旧 2020-12-03 00:43

I have 2 div\'s contained in a third. One of the contained div\'s is floated left, the other floated right. I would like the 2 sibling div\'s to always be at the same heig

10条回答
  •  日久生厌
    2020-12-03 01:17

    I can rack my brain all I want, but I think this can really be solved only using table behaviour, i.e. using

    s (if you need to be IE6 and IE7 compatible) or display: table / table-row / table-cell (which is effectively the same thing but won't embarrass you in front of your peers because tables are evil. ;).

    I'd go for a table.

    Feel free to prove me wrong and post a sane CSS solution, I'd be delighted!

    提交回复
    热议问题