The css position:fixed just fixed the element to the document. If you want to fix an element to one of its parents, you are coming to the right place.