Click to See Complete Forum and Search --> : centering image


Taurus
03-25-2008, 04:10 PM
Strange, this code center image in IE, but not work in Firefox.

<html>
<head>
<title>search</title>

<style type="text/css">
table {
display:none;
}

table.myTable {
display:block;
}
</style>

</head>

<body>

<table class="myTable" width="100%" height="100%">
<tr>
<td align="center" valign="middle"><img border="0" width="700" height="100" src="http://web.com/text.jpg"></td>
</tr>
</table>

</body>
</html>

KDLA
03-25-2008, 04:40 PM
Add "margin: 0 auto;" to your image's style.

Taurus
03-26-2008, 08:16 AM
added, but not help, stay in left top corner.