![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
The technique works well in MSIE 6, Opera 7.23, Mozilla 1.3, and Netscape 6.2. But in MSIE 5.5 it does not work at all; the block of menu options is flush with the left edge of the viewport and the block of text is flush with the left edge of the container div. |
#3
| |||
| |||
|
|
Alex Bell wrote: The technique works well in MSIE 6, Opera 7.23, Mozilla 1.3, and Netscape 6.2. But in MSIE 5.5 it does not work at all; the block of menu options is flush with the left edge of the viewport and the block of text is flush with the left edge of the container div. parent-element{ text-align:center; /* IE HACK */ } element{ margin:0 auto; width:element-width; text-align:left; /* end IE HACK */ } |
#4
| |||
| |||
|
|
On Thu, 18 Dec 2003 12:15:22 +0100, Anne van Kesteren mail (AT) annevankesteren (DOT) nl> wrote: Alex Bell wrote: The technique works well in MSIE 6, Opera 7.23, Mozilla 1.3, and Netscape 6.2. But in MSIE 5.5 it does not work at all; the block of menu options is flush with the left edge of the viewport and the block of text is flush with the left edge of the container div. parent-element{ text-align:center; /* IE HACK */ } element{ margin:0 auto; width:element-width; text-align:left; /* end IE HACK */ } Thanks, Anne. I'm not sure I understand it, but I'll play with it until I do. |
#5
| |||
| |||
|
|
Alex Bell wrote: On Thu, 18 Dec 2003 12:15:22 +0100, Anne van Kesteren mail (AT) annevankesteren (DOT) nl> wrote: Alex Bell wrote: The technique works well in MSIE 6, Opera 7.23, Mozilla 1.3, and Netscape 6.2. But in MSIE 5.5 it does not work at all; the block of menu options is flush with the left edge of the viewport and the block of text is flush with the left edge of the container div. parent-element{ text-align:center; /* IE HACK */ } element{ margin:0 auto; width:element-width; text-align:left; /* end IE HACK */ } Thanks, Anne. I'm not sure I understand it, but I'll play with it until I do. Maybe this structure will save you some time: parent-element element Centered in most browsers, like IE5.0 and Mozilla1.6 /element /parent-element Of course you are using HTML and you choose other elements, probably something like: body div id="ie-hack" centered content /div /body You could also center the <body> itself, but that isn't supported in IE5.x: (<http://annevankesteren.nl/archives/2003/12/03/your-body-element-is-just-a-div>) |
![]() |
| Thread Tools | |
| Display Modes | |
| |