I have some html that is inserted dynamically with javascript. I have position:absolute; so that it does not affect the layout of the page elements. However, when a flash message appears on the top of the page, all of the elements shift down except for the absolutely positioned element. So it seems that I want to combine properties of absolute and relative positioning. How do I do this?
I have some html that is inserted dynamically with javascript. I have position:absolute; so
Share
Add
position:relative;to the highest-level element which you think describes “the page”. For example:edit: This is an excellent demo by thirtydot which perfectly illustrates the concept: http://jsfiddle.net/qGTw6