Both columns same height as deepest column?

前端 未结 3 584
闹比i
闹比i 2020-12-01 23:05

If I have a div layout like this:

<
3条回答
  •  萌比男神i
    2020-12-01 23:32

    Adapted from here:

    Create a container around the two fixed columns, and have css something like this:

    #container {
        float:left;
        width:[sum of the two columns width];
    }
    #fixedwidthwide {
        float:left;
        width:[whatever];
    }
    #fixednarrow {
        float:left;
        width:[whatever];
    }
    

    Note that this is only necessary if the columns need to be of equal height for some reason. If not, you can just follow philfreo's suggestion and use faux columns.

提交回复
热议问题