<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
#a {
overflow: auto;
border: red 1px solid;
position: relative;
}
#b {
height: 400px;
background: yellow;
width: 200px;
float: left;
}
#c {
background: green;
height: 100%;
position: absolute;
right: 0;
width: 40px;
}
</style>
</head>
<body>
<div id="a">
<div id="b">A</div>
<div id="c">B</div>
</div>
</body>
</html>