I don't think you can put a fixed element inside a container.
Anyway, I've never tried something like this, but theoretically, this should work.
margin: 0 auto; /* Centering the container */
width: 80%; /* Giving it a width of 80% */
<div id="container">I am the container</div>
<div class="SideNavContainer">I am the side nav</div>
The main container is centered as shown by margin: 0 auto;. The width is 80% so margin-left is 10% and margin-right is 10%.
Then, your .SideNavContainer has a fixed position that is 10% away from the right.
The main container's margin-right = .SideNavContainer's right.