Hi folks, I've got an element 'e' that I want to position absolute to my html documents page boundaries (the initial containing block). The problem is, the element is within a containing div 'd' that is relatively positioned. When I set the css for 'e' as position:absolute, 'e' is positioned absolutely in relation to the containing element 'd'.

Is there a way to position 'e' absolutely in relation to the page boundaries without removing the relative positioning from 'd'?

Thanks, Eddie

1 answer

0
points
This was chosen as the best answer

position: fixed; will place it relative to the browser window come what may, so if your page isn't centered that would work.

alternatively place the element outside the div and then position it back in?

Answered almost 7 years ago by Tony Crockford
  • Well that was quick, cheers :-) Eddie almost 7 years ago