How to force CSS float to the left not to fold when browser width shrinks

I have 2 div boxes. Everything works fine, but when the browser shrinks to less than 800px or so, the second div moves below the first div. How can I make it always stay to the right of it?

#testbox1 {
background-color: #0000ff;
min-width: 300px;
width: 30%;
height: 200px;
position: relative;
float: left;
}

#testbox2 {
background-color: #00ffff;
width: 500px;
height: 200px;
position: relative;
float: left;
}

      

+2


source to share


1 answer


Specify parent element a min-width: 800px;

.



+1


source







All Articles