Hi, I need help. look at the code: <div id="layer1" style="position: absolute; left: 50px; top: 50px; width: 300px; height: 100px; z-index: 1"> </div> I need to use div layer at center of the screen, so that when a user trying browse my site from normal screen monitor or extra width screen monitor it will show at center for both screen. where can i put the code for 'align'? please let me know with a valid code. thanks,
thanks for the support but it not showing correctly at the center! Please check the code once again- <div id="layer1" style="position: absolute; left: 50px; top: 50px; margin 0 auto; width: 300px; height: 100px; z-index: 1" class="style2"> </div>
Besides the change that jmiles mentioned, you should also change it to left:0; and add right:0; That should work. Demonstration in link below: http://www.iangraham.org/books/xhtml1/chap13/center-position.html
He already has margin:auto, the problem isn't that, it's the fact that he still has left:50;. My instructions above are the solution to his problem.