|
When
open the locked file with IE6 and IE7 browser, after login,
the contents are shifted to the left or are left justified,
but Firefox and Opera are just fine. How to correct this?
This problem happens when you are making a CSS based web site.
Due to a small bug in Internet Explorer's implementation, you
need two steps to center a div or a block-level element horizontally.
First step, apply "center" to the text-align property
of body element, and all the elements within it will be centered.
Like so:
body {text-align:
center; }
The line above will, of course, center all the text inside
the centered elements as well, which is generally not what we
want. So, the next step is to aligh the text within the block
back to the left. So here’s all the code:
body {text-align: center; }
#container {width: 760px; margin: 0 auto;
text-align: left; }
With above code, the element "container" will be
centered in all web browsers.

|