I have the following code:
[QUOTE]
<table width=”600″ border=”0″ cellspacing=”2″ id=”foto1″ style=”display:block” align=’center’>
<tr>
<td width=”600″ height=”400″ align=”center” valign=”middle”><script type=”text/javascript”>
AC_FL_RunContent( ‘codebase’,’
</tr>
</table>
But the image does not show on center.
What parameter mas I use to center the image?
thanks
<i>
</i><table border="0" cellspacing="2" id="foto1" [COLOR="Blue"]style="display:block;
width:600px; margin:0 auto 0 auto;"[/COLOR]>
<i>
</i><style type="text/css">
[COLOR="Blue"]#foto1[/COLOR]{
display:block;
width:600px;
margin:0 auto 0 auto;
}
</style>
<i>
</i><table border="0" cellspacing="2" [COLOR="Blue"]id="foto1"[/COLOR]>
the HTML [B]align="center"[/B] will center only the inline elements within a block-level elements, not the block level elements themselves. Anyway, you should use mainly CSS to style elements, not the HTML attributes. Some are deprecated.
Use CSS margin auto to center the element:
<i>
</i><table border="0" cellspacing="2" id="foto1" [COLOR="Blue"]style="display:block;
width:600px; margin:0 auto 0 auto;"[/COLOR]>
Or even better give the table a [B][I]CSS class[/I][/B]
<i>
</i><style type="text/css">
[COLOR="Blue"]#foto1[/COLOR]{
display:block;
width:600px;
margin:0 auto 0 auto;
}
</style>
[/QUOTE]
<i>
</i><table border="0" cellspacing="2" [COLOR="Blue"]id="foto1"[/COLOR]>
<i>
</i><style type="text/css">
.foto1{
display:block;
width:600px;
margin:0 auto 0 auto;
}
</style>
<i>
</i> <table border="0" cellspacing="2" id="foto1" class="foto1">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','400','src','sale?img=2&id=<? echo $id ?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','sale?img=2&id=<? echo $id ?>' ); //end AC code</script></td>
</tr>
</table>
<i>
</i><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<style type="text/css">
.foto1{
display:block;
width:600px;
margin:0 auto 0 auto;
background:#ccc;
}
</style>
</head>
<body>
<table border="0" cellspacing="2" id="foto1" class="foto1">
<tr>
<td>something</td>
</tr>
</table>
</body>
</html>
Should work, it works for me:
[/QUOTE]
<i>
</i><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<style type="text/css">
.foto1{
display:block;
width:600px;
margin:0 auto 0 auto;
background:#ccc;
}
</style>
</head>
<body>
<table border="0" cellspacing="2" id="foto1" class="foto1">
<tr>
<td>something</td>
</tr>
</table>
</body>
</html>
[code]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>PRODUCT PHOTOS</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<style type="text/css">
.style8 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #24231E; font-weight: bold; }
.foto{
display:block;
width:600px;
margin:0 auto 0 auto;
background:#ccc;
}
</style>
</head>
<body>
<?
include "call_db.inc.php";
$sql="select * from inter_main_".$paiscode." where sale='1' and id=$id limit 1";
$result=mysql_db_query("db_name",$sql) ;
$regist=mysql_fetch_array($result);
$id=$regist["id"];
$reference=$regist["reference"];
$coun=$regist["county"];
$cit=$regist["city"];
$zipcode=$regist["zipcode"];
$stat=$regist2["state"];
$count=$regist["country"];
?>
<script>
function muda(){
if(document.getElementById('foto1').style.display = 'none'){
document.getElementById('foto1').style.display = 'block';
document.getElementById('foto2').style.display = 'none';
document.getElementById('foto3').style.display = 'none';
document.getElementById('info').style.display = 'none';
document.getElementById('visita').style.display = 'none';
}
}
function muda2(){
if(document.getElementById('foto2').style.display = 'none'){
document.getElementById('foto2').style.display = 'block';
document.getElementById('foto1').style.display = 'none';
document.getElementById('foto3').style.display = 'none';
document.getElementById('info').style.display = 'none';
document.getElementById('visita').style.display = 'none';
}
}
function muda3(){
if(document.getElementById('foto3').style.display = 'none'){
document.getElementById('foto3').style.display = 'block';
document.getElementById('foto1').style.display = 'none';
document.getElementById('foto2').style.display = 'none';
document.getElementById('info').style.display = 'none';
document.getElementById('visita').style.display = 'none';
}
}
</script>
<table width='680' border='0' cellspacing='0' cellpadding='0' align="center">
<tr>
<td align='center'><img src='images/frames/img/fundo_top.png' width='680'></td>
</tr>
<tr>
<td align='center' valign='top' style='background:url(images/frames/img/fundo1.png) repeat-y'>
<table border="0" cellspacing="2" id="foto1" class="foto">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','400','src','sale?img=2&id=<? echo $id ?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','sale?img=2&id=<? echo $id ?>' ); //end AC code</script></td>
</tr>
</table>
<table border="0" cellspacing="2" id="foto2" class="foto">
<tr>
<td width="600" height="400" align="center" valign="middle"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','400','src','sale?img=3&id=<? echo $id ?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','sale?img=3&id=<? echo $id ?>' ); //end AC code</script></td>
</tr>
</table>
<table border="0" cellspacing="2" id="foto3" class="foto">
<tr>
<td width="600" height="400" align="center" valign="middle"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','600','height','400','src','sale?img=4&id=<? echo $id ?>','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','sale?img=4&id=<? echo $id ?>' ); //end AC code</script></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align='center'><img src='images/frames/img/fundo_bot.png' width='680'></td>
</tr>
</table>
<table width='680' border='0' cellspacing='0' cellpadding='0' align="center">
<tr>
<td align='center'><img src='images/frames/img/fundo_top.png' width='680' height='16'/></td>
</tr>
<tr>
<td height='10' align='center' valign='top' style='background:url(images/frames/img/fundo1.png) repeat-y'>
<table width="650" border="0">
<tr>
<td align="center"><table width="650" height="95" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="95" height="95" background="admin/get_miniature.php?img=2&cliente=<? echo"$id"; ?>&max_height=95'" bgcolor="#FFFFFF" style="background-position:center; background-repeat:no-repeat"><a href="javascript: muda();" onclick="muda();"><img src="images/tumbmain.png" width="95" height="95" border="0" /></a></td>
<td width="60" height="95"> </td>
<td width="95" height="95" background="admin/get_miniature.php?img=3&cliente=<? echo"$id"; ?>&max_height=100'" bgcolor="#FFFFFF" style="background-position:center; background-repeat:no-repeat"><a href="javascript: muda2();" onclick="muda2();"><img src="images/tumbmain.png" width="95" height="95" border="0" /></a></td>
<td width="60" height="95"> </td>
<td width="95" height="95" background="admin/get_miniature.php?img=4&cliente=<? echo"$id"; ?>&max_height=100'" bgcolor="#FFFFFF" style="background-position:center; background-repeat:no-repeat"><a href="javascript: muda3();" onclick="muda3();"><img src="images/tumbmain.png" width="95" height="95" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td align='center'><img src='images/frames/img/fundo_bot.png' width='680' height='16'/></td>
</tr>
</table>
</body>
</html>
</code>
Let see if you can help here.
Thanks
0.1.9 — BETA 5.19