<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
#wrap{
500px;
/*height: 300px;*/
background: red;
}
#contain{
300px;
height: 300px;
background: blue;
float: right;
}
#wrap:after{
content:".";
height:0;
visibility:hidden;
display:block;
clear:both;
}
</style>
</head>
<body>
<div id="wrap" >
<div id="contain">
</div>
</div>
</body>
</html>