Problem in IE6

A couple of screen shots of the same page, a simple centered table.

  1. Example 1 - as seen in all browsers except IE6
  2. Example 2 - as seen in IE6.

This happens only with the full DTD
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

This puts IE6 into 'standards' mode as opposed to 'quirks' mode.

Without the URL in the DTD, IE6 displays the table as in Example 1. (quirks mode).

Example 1 Example 2

HTML for the table =

<div align="center">
<table width="250" border="1">

Nice and simple. The reason I was using the <div> to center align the table was to cater for NN3 which doesn't recognize the <table align="center"> attribute. The pages that displayed this problem are older pages.

Cure - removing the <div align="center"> tag and using <table align="center"> and forgetting about NN3.

A different cure leaving the div tag to center the table - set the cell alignment to left.

I have seen reports that the default table content alignment for IE6 is centering instead of left alignment but I have not seen this. A table with no alignment or using <table align="center"> still has the text left aligned in the cells as in the past.

Lorem ipsum dolor sit amet, consectetuer adipiscing. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna.