PDA

View Full Version : HTML Table aligning *Resolved*



pantera989
12-08-2010, 12:14 PM
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?

DeSade
12-08-2010, 12:15 PM
You could try the older version of it

<center><table width etc></center>

Programmar
12-08-2010, 12:16 PM
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 :)

pantera989
12-08-2010, 12:17 PM
Thanks, that worked.

dpDesignz
13-08-2010, 12:53 AM
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

Renmoo
15-08-2010, 09:58 PM
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.