i have a page with 2 divs, both 700px wide. I want div B to appear before div A although div A is first in the list. Now i've managed to do that with absolute positioning but i need it to be centered in the webpage.

#A {width:700px; margin:0 auto; }
#B {position:absolute; width:700px; margin:0 auto;}
<div id="A">this is div A</div>
<div id="B">this is div B</div>

So div B appears on top on div A but it is not centered on the page. Anybody got any ideas how to do that?