I have had the problem a number of times and I can never for the life of me remember the solution! So I hope writing it up here will allow it to sink into to my brain, or at least I can come here to find out!
Ok so you have HTML DIV that you would like to be presented in the centre of your browser. First off you need to set the width and set the left and right margins to auto at the DIV level:
width:800px;margin-left:auto;margin-right:auto;
Then, to get IE to play ball you need to include a text-align:center style to your HTML body so I''ve just added the following to my stylesheet:
body {text-align:center}
Hope this helps!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment