How to make three columns the same height?

后端 未结 4 1760
后悔当初
后悔当初 2021-01-15 18:20

I\'ve viewed a dozen questions and answers to this issue, but there doesn\'t seem to be a single best answer for my situation.

I\'ve got a page (http://awesomealbums

4条回答
  •  心在旅途
    2021-01-15 18:44

    Use a negative margin'hack'.

    Give each column a margin-bottom of -9999 and a padding-bottom of 9999, and a height of 100%. I'm not sure if that is the right way round or not though. But the idea is that as one container expands, the others will also all expand due to the 100% height, the padding and margin work such that the margin is hidden outside the 100% height - Google for 'negative margin columns'.

    Alterantivly use css-discuss to see all the industry recognised ways to build 3 column layouts, there are fluid examples - http://css-discuss.incutio.com/wiki/Three_Column_Layouts

提交回复
热议问题