What's the trick for fixed positioned elements inside a liquid layout?
So I have a fixed positioned element that resides in an expanding element.
What's the trick to keep it in the same place whether the browser is at 1024px wide or 2000px ?
The fixed-size element must be display:block
, and have a margin:0 auto
. To have fixed position, position has to be set via javascript, and updated when the window is resized.
精彩评论