Forum Home
Press F1
 
Thread ID: 111796 2010-08-12 00:14:00 HTML Table aligning *Resolved* pantera989 (14533) Press F1
Post ID Timestamp Content User
1126902 2010-08-12 00:14:00 I'm trying to align a table on a web page to centred using:

<table width="200" border="1" align="center">

This loads fine in IE Editplus and dream-weaver, but in goggle chrome it aligns left. Is there something wrong with my code?
pantera989 (14533)
1126903 2010-08-12 00:15:00 You could try the older version of it

<center><table width etc></center>
DeSade (984)
1126904 2010-08-12 00:16:00 I'm trying to align a table on a web page to centred using:

<table width="200" border="1" align="center">

This loads fine in IE Editplus and dream-weaver, but in goggle chrome it aligns left. Is there something wrong with my code?

<center>
<table width="200" border="1" >

</table>
</center>

Probably your safest bet :)
Programmar (15930)
1126905 2010-08-12 00:17:00 Thanks, that worked. pantera989 (14533)
1126906 2010-08-12 12:53:00 Make sure you check it in various browsers. I found the opposite the other day with it going to the left in IE. I suggest trying to use div or CSS dpDesignz (15919)
1126907 2010-08-15 09:58:00 Make sure you have declared one DTD at the top.

Alternative to the expression that you have sugggested would be this:

<div style="margin: 0 auto; width: 200px; border: 1px solid black;">
Text
</div>

Clear or float as needed.
Renmoo (66)
1