why is one of two floated divs are pushed to the next line?
问题 I have two divs which I want to place in one line, the first one with a fixed width and the second without a set width. If I try to set both to float:left, the second div would go to the the next line if it contains too many words. But if the second one is a non-floated one, it stays in the same line with the first div. Why? .left { float: left; width: 250px; height: 300px; background-color: red; } .right { /*if set to float:left, it might goes the next line*/ /*float: left;*/ height: 300px;