My code is like this.
some text here
CSS:
Why don't you use position:absolute
position:fixed
always relative to the browser
.outer {
width:200px;
height:600px;
background-color:red;
margin:0 auto;
position:relative
}
.inner {
width:50px;
border:1px solid white;
position:absolute; right:0
}
DEMO
If it is compulsory to use position:fixed
then you can assign the margin-left
value, since you are using fixed with for both the divs.
.inner {
width:50px;
border:1px solid white;
position:fixed; margin-left:150px
}
DEMO 2