FOROS DE INFORMATICA

Diseño web => HTML => Mensaje iniciado por: salome en Noviembre 01, 2012, 12:54:37



Título: Problema con tabla
Publicado por: salome en Noviembre 01, 2012, 12:54:37
Hola, tengo un problema con una tabla que no soy capaz de centrarla. He probado muchas cosas pero ninguna funciona. Dejo el código a ver si alguien puede ayudarme
<style type="text/css">
td img {display: block;}
</style>
<table style="HEIGHT:100%;WIDTH:100%";" border="0" cellpadding="0" cellspacing="0" align="center">
  <!-- fwtable fwsrc="Sin título" fwpage="Página 1" fwbase="infocomercio" fwstyle="Dreamweaver" fwdocid = "487495439" fwnested="0" -->
 
<tr>
  <td>
    <td><img src="spacer.gif" width="119" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="10" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="560" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="7" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="104" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
  <tr>
    <td colspan="5"><img name="infocomercio_r1_c1" src="infocomercio_r1_c1.jpg" width="800" height="61" id="infocomercio_r1_c1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="61" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="4"><img name="infocomercio_r2_c1" src="infocomercio_r2_c1.jpg" width="119" height="539" id="infocomercio_r2_c1" alt="" /></td>
    <td colspan="3"><img name="infocomercio_r2_c2" src="https://lh6.googleusercontent.com/-t37_noPUvdI/UBli3mCuJyI/AAAAAAAAABo/-4YnEC98g3Y/s349/logo2%2520google.jpg" width="577" height="313" id="infocomercio_r2_c2" alt="" /></td>
    <td rowspan="4"><img name="infocomercio_r2_c5" src="infocomercio_r2_c5.jpg" width="104" height="539" id="infocomercio_r2_c5" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="313" alt="" /></td>
  </tr>
  <tr>
    <td colspan="3"><img name="infocomercio_r3_c2" src="infocomercio_r3_c2.jpg" width="577" height="88" id="infocomercio_r3_c2" usemap="#m_infocomercio_r3_c2" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="88" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="2"><img name="infocomercio_r4_c2" src="infocomercio_r4_c2.jpg" width="10" height="138" id="infocomercio_r4_c2" alt="" /></td>
    <td><a href="www.viajesbuenavista.com">www.viajesbuenavista.com</a>"infocomercio_r4_c3.jpg" width="560" height="67" id="infocomercio_r4_c3" alt="" /></td>
    <td rowspan="2"><img name="infocomercio_r4_c4" src="infocomercio_r4_c4.jpg" width="7" height="138" id="infocomercio_r4_c4" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="67" alt="" /></td>
  </tr>
  <tr>
    <td><img name="infocomercio_r5_c3" src="infocomercio_r5_c3.jpg" width="560" height="71" id="infocomercio_r5_c3" usemap="#m_infocomercio_r5_c3" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="71" alt="" /></td>
  </tr>
</table>
<map name="m_infocomercio_r3_c2" id="m_infocomercio_r3_c2">
  <area shape="rect" coords="10,42,570,78" href="http://www.viajesbuenavista.es" target="_blank" alt="" />
</map>
<map name="m_infocomercio_r5_c3" id="m_infocomercio_r5_c3">
  <area shape="rect" coords="0,28,560,71" href="javascript:;" alt="" />
</map>


Título: Re: Problema con tabla
Publicado por: Etereo en Noviembre 06, 2012, 10:01:28
Hola, viendo como la tienes construida, yo la veo centrada quitando el width 100%, no sé si son las imágenes de dentro las que ves mal, yo las imágenes no las veo como es lógico. Con qué navegador las ves mal? Yo tengo Firefox e IE9

Un saludo


Título: Re: Problema con tabla
Publicado por: IlyaBakhlin en Noviembre 21, 2012, 06:03:09
Hola, tengo un problema con una tabla que no soy capaz de centrarla. He probado muchas cosas pero ninguna funciona. Dejo el código a ver si alguien puede ayudarme
<style type="text/css">
td img {display: block;}
</style>
<table style="HEIGHT:100%;WIDTH:100%";" border="0" cellpadding="0" cellspacing="0" align="center">
  <!-- fwtable fwsrc="Sin título" fwpage="Página 1" fwbase="infocomercio" fwstyle="Dreamweaver" fwdocid = "487495439" fwnested="0" -->
 
<tr>
  <td>
    <td><img src="spacer.gif" width="119" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="10" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="560" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="7" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="104" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
  <tr>
    <td colspan="5"><img name="infocomercio_r1_c1" src="infocomercio_r1_c1.jpg" width="800" height="61" id="infocomercio_r1_c1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="61" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="4"><img name="infocomercio_r2_c1" src="infocomercio_r2_c1.jpg" width="119" height="539" id="infocomercio_r2_c1" alt="" /></td>
    <td colspan="3"><img name="infocomercio_r2_c2" src="https://lh6.googleusercontent.com/-t37_noPUvdI/UBli3mCuJyI/AAAAAAAAABo/-4YnEC98g3Y/s349/logo2%2520google.jpg" width="577" height="313" id="infocomercio_r2_c2" alt="" /></td>
    <td rowspan="4"><img name="infocomercio_r2_c5" src="infocomercio_r2_c5.jpg" width="104" height="539" id="infocomercio_r2_c5" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="313" alt="" /></td>
  </tr>
  <tr>
    <td colspan="3"><img name="infocomercio_r3_c2" src="infocomercio_r3_c2.jpg" width="577" height="88" id="infocomercio_r3_c2" usemap="#m_infocomercio_r3_c2" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="88" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="2"><img name="infocomercio_r4_c2" src="infocomercio_r4_c2.jpg" width="10" height="138" id="infocomercio_r4_c2" alt="" /></td>
    <td><a href="www.viajesbuenavista.com">www.viajesbuenavista.com</a>"infocomercio_r4_c3.jpg" width="560" height="67" id="infocomercio_r4_c3" alt="" /></td>
    <td rowspan="2"><img name="infocomercio_r4_c4" src="infocomercio_r4_c4.jpg" width="7" height="138" id="infocomercio_r4_c4" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="67" alt="" /></td>
  </tr>
  <tr>
    <td><img name="infocomercio_r5_c3" src="infocomercio_r5_c3.jpg" width="560" height="71" id="infocomercio_r5_c3" usemap="#m_infocomercio_r5_c3" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="71" alt="" /></td>
  </tr>
</table>
<map name="m_infocomercio_r3_c2" id="m_infocomercio_r3_c2">
  <area shape="rect" coords="10,42,570,78" href="http://www.viajesbuenavista.es" target="_blank" alt="" />
</map>
<map name="m_infocomercio_r5_c3" id="m_infocomercio_r5_c3">
  <area shape="rect" coords="0,28,560,71" href="javascript:;" alt="" />
</map>

Buenas tardes, Salome.
Te he marcado en rojo lo que tienes que borrar del código, ya que sobra y, seguramente, es el problema a la hora de cerrar la tabla.


Título: Re: Problema con tabla
Publicado por: zasen en Noviembre 22, 2012, 11:28:09
Hola, tengo un problema con una tabla que no soy capaz de centrarla. He probado muchas cosas pero ninguna funciona. Dejo el código a ver si alguien puede ayudarme
<style type="text/css">
td img {display: block;}
</style>
<table style="HEIGHT:100%;WIDTH:100%";"border="0" cellpadding="0" cellspacing="0" align="center">
  <!-- fwtable fwsrc="Sin título" fwpage="Página 1" fwbase="infocomercio" fwstyle="Dreamweaver" fwdocid = "487495439" fwnested="0" -->
 
<tr>
    <td><img src="spacer.gif" width="119" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="10" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="560" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="7" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="104" height="1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
  <tr>
    <td colspan="5"><img name="infocomercio_r1_c1" src="infocomercio_r1_c1.jpg" width="800" height="61" id="infocomercio_r1_c1" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="61" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="4"><img name="infocomercio_r2_c1" src="infocomercio_r2_c1.jpg" width="119" height="539" id="infocomercio_r2_c1" alt="" /></td>
    <td colspan="3"><img name="infocomercio_r2_c2" src="https://lh6.googleusercontent.com/-t37_noPUvdI/UBli3mCuJyI/AAAAAAAAABo/-4YnEC98g3Y/s349/logo2%2520google.jpg" width="577" height="313" id="infocomercio_r2_c2" alt="" /></td>
    <td rowspan="4"><img name="infocomercio_r2_c5" src="infocomercio_r2_c5.jpg" width="104" height="539" id="infocomercio_r2_c5" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="313" alt="" /></td>
  </tr>
  <tr>
    <td colspan="3"><img name="infocomercio_r3_c2" src="infocomercio_r3_c2.jpg" width="577" height="88" id="infocomercio_r3_c2" usemap="#m_infocomercio_r3_c2" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="88" alt="" /></td>
  </tr>
  <tr>
    <td rowspan="2"><img name="infocomercio_r4_c2" src="infocomercio_r4_c2.jpg" width="10" height="138" id="infocomercio_r4_c2" alt="" /></td>
    <td><a href="www.viajesbuenavista.com">www.viajesbuenavista.com</a>"infocomercio_r4_c3.jpg" width="560" height="67" id="infocomercio_r4_c3" alt="" /></td>
    <td rowspan="2"><img name="infocomercio_r4_c4" src="infocomercio_r4_c4.jpg" width="7" height="138" id="infocomercio_r4_c4" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="67" alt="" /></td>
  </tr>
  <tr>
    <td><img name="infocomercio_r5_c3" src="infocomercio_r5_c3.jpg" width="560" height="71" id="infocomercio_r5_c3" usemap="#m_infocomercio_r5_c3" alt="" /></td>
    <td><img src="spacer.gif" width="1" height="71" alt="" /></td>
  </tr>
</table>
<map name="m_infocomercio_r3_c2" id="m_infocomercio_r3_c2">
  <area shape="rect" coords="10,42,570,78" href="http://www.viajesbuenavista.es" target="_blank" alt="" />
</map>
<map name="m_infocomercio_r5_c3" id="m_infocomercio_r5_c3">
  <area shape="rect" coords="0,28,560,71" href="javascript:;" alt="" />
</map>


Hola a parte del td que te ha dicho mi compañero yo te he hecho otro ajuste, creo que el problema es que no lee esa parte.

PD: creo que hay es el signo de igual "="


Título: Re: Problema con tabla
Publicado por: estefanio en Marzo 26, 2013, 05:38:10
Amigo, ya no se usan tablas. Ahora lo único que tienes que usar son DIV


Título: Re: Problema con tabla
Publicado por: Boot en Marzo 26, 2013, 06:37:00
Si que se usan tablas pero no para posicionar, se usan para introducir datos. Si la quieres centrada lo más normal es un posicionamiento absoluto o relativo
Un saludo
Boot