On a two-column page, how can I grow the left div to the same height of the right div using CSS or Javascript?

后端 未结 11 2754
野趣味
野趣味 2020-12-15 07:17

I\'m trying to make a two-column page using a div-based layout (no tables please!). Problem is, I can\'t grow the left div to match the height of the right one. My right di

11条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-15 07:28

    @hoyhoy

    If a designer can make this work in html, then he can have this design. If he is a true master of web design, he will realize that this is a limitation of the media, as video is not possible in magazine ads.

    If he would like to simulate weight by giving the 2 columns equal importance, than change the borders, so that they appear to be of the same weight, and make the colors of the borders contrast to the font color of the columns.

    But as for making the physical elements the same height, you can only do that with a table construct, or setting the heights, at this point in time. To simulate them appearing the same size, they don't have to be the same size.

提交回复
热议问题