Make floating divs the same height

You could try instead of using float, use display: table-cell. You might find some older browsers don’t understand this rule however. See below:

#wrapper {
    display: table; // See FelipeAls comment below
    width: 300px;
}

#left {
    display: table-cell;
    width: 50px;
    background: blue;
}

#right {
    display: table-cell;
    width: 250px;
    background: red;
}

Leave a Comment