hallo,

i have align problems about my data into a html table. In Firefox everything is ok aligned to center. in IE everything is alligned to left and thats not ok

my code

</head>

<body bgcolor=#FF8000>

<div align='center'>

<table border='1' align='center' width="80%" cellspacing="0" cellpadding="0" bgcolor=#FFFFFF>
<tr allign='center'>
<td align='center' width="492" height="84" alt=""><img src="./images/main banner.jpg" width="492" height="84" alt="" align="middle">

<div align='center'> 

<br><br>
<p align='center'><b>ΜΗΝΥΜΑ</b></p>
<br><br>
<?php

-------connect to database-------

-------form------


?>

</div>

</td>
</tr>

</table> <br>
</div>
<p align='center'><a href="......"> ADMIN</a></p>
</body>

except the table itself nothing is at center. and thats only in IE . safari and firefox are working good...

what should i do

do you have a doctype. a lot of cross-browser issues are solved just by defining a doctype.

you might also want to look into css.

do you have a doctype. a lot of cross-browser issues are solved just by defining a doctype.

you might also want to look into css.

----------------------------------------------------
than u for your quick answer.

so i inserted an css (external)
this one

.alltocenter { font-family: Verdana; font-size:12px; vertical-align: top; text-align: center; border-spacing: 1pt 1pt; border: 1px none; }

and i called it in my table

<table class='alltocenter' border='1' align='center' width="80%" cellspacing="0" cellpadding="0" bgcolor=#FFFFFF>
<tr>
.
.
it works (i see verdana) but the text and the image are still in the left!!
i also defined a doctype
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
even i dont know what a doctype realy does... (i added this line before <html> tag......

something else....

i took a closer look at the code and saw some misspellings like "allign" and that you have an alt="" attribute in a table data element. ??? look for things like that.

also, i recommend retyping your code and organizing it better. you should find your mistake.

ok man. u were right. it was a stupid error.

just for the records

the wrong line:
<td align='center' width="492" height="84" alt=""><img src="./images/main banner.jpg" width="492" height="84" alt="" align="middle">

the right line:
<td><img src="./images/main banner.jpg" width="492" height="84" align='middle'>

thank u very much...

This article has been dead for over six months. Start a new discussion instead.