Does anybody know why IE6 or 7 don't center tables while Firefox and Operate display them correctly? IE would align the table to the left instead of center.
What are you using to center the table? <center> tags, or align="center", or are you wrapping it in a div with text-align: center?
Here is my code. I used aling="center" to center the two pictures but on IE both pictures are ligned left. I appreciate your help. <table border="0" bordercolor="blue" width="100%"> <tr><!--Picture Row--> <td align="center" width="300"><a href="http://www.angkorthom.us/uploads/forums/stung-sen.jpg"><img src="http://www.angkorthom.us/uploads/forums/stung_sen300.jpg" border="0"></a></td><!-- Picture 1 --> <td align="center" width="300"><a href="http://www.angkorthom.us/uploads/forums/vanneth640.jpg"><img src="http://www.angkorthom.us/uploads/forums/vanneth300.jpg" border="0" /></td><!-- Picture 2 --> </tr> <tr><!-- Description Row --> <td align="center" width="350">Kampong Thom Province is located 168 Km from Phnom Penh. Above is the picture of Stung Sen bridge which is in the song of Ms. Song Seng Horn called "Stung Sen Srok Khmer." </td><!-- Description of Picture1 --> <td align="center" width="350">Noy Vanneth, a famous singer that always sings the romantic songs, performed on TV5. </td><!-- Description of Picture2 --> </tr> </table> Code (markup):
OK, this works: <table border="1" bordercolor="blue" width="100%"> <tr><!--Picture Row--> <td align="center" width="50%"><a href="http://www.angkorthom.us/uploads/forums/stung-sen.jpg"><img src="http://www.angkorthom.us/uploads/forums/stung_sen300.jpg" border="0"></a></td><!-- Picture 1 --> <td align="center" width="50%"><a href="http://www.angkorthom.us/uploads/forums/vanneth640.jpg"><img src="http://www.angkorthom.us/uploads/forums/vanneth300.jpg" border="0" /></td><!-- Picture 2 --> </tr> <tr><!-- Description Row --> <td align="center" width="50%">Kampong Thom Province is located 168 Km from Phnom Penh. Above is the picture of Stung Sen bridge which is in the song of Ms. Song Seng Horn called "Stung Sen Srok Khmer."</td><!-- Description of Picture1 --> <td align="center" width="50%">Noy Vanneth, a famous singer that always sings the romantic songs, performed on TV5.</td><!-- Description of Picture2 --> </tr> </table> Code (markup): You can't declare a relative width for the table (100%) and then fixed widths for the rows (300, 350). I just had to change the td width to 50% and IE centered them properly.