I was going through the similar problem where I needed to create a fixed div but it should take the required space and shouldn't overlap the content. I figured a way to make it possible easily although you may need to write more code. Here is how you can do it:
Hope this helps.