FOROS DE INFORMATICA
Noticias: Habilitada la opción de Karma para usuarios con más de 50 mensajes
 
*
Bienvenido(a), Visitante. Por favor, ingresa o regístrate.
¿Perdiste tu email de activación?
Abril 18, 2024, 06:40:00


Ingresar con nombre de usuario, contraseña y duración de la sesión


Páginas: [1]
  Imprimir  
Autor Tema: Problema con tabla  (Leído 6474 veces)
salome
Nuevo
*

Karma:0
Desconectado Desconectado

Mensajes: 1


« : 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>
En línea
Etereo
Global Moderator
Habitante
*****

Karma:9
Desconectado Desconectado

Mensajes: 2374



« Respuesta #1 : 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
En línea

IlyaBakhlin
Visitante
« Respuesta #2 : 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.
En línea
zasen
Adicto al foro
****

Karma:0
Desconectado Desconectado

Mensajes: 312


« Respuesta #3 : 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 "="
En línea
estefanio
Nuevo
*

Karma:0
Desconectado Desconectado

Mensajes: 11


« Respuesta #4 : Marzo 26, 2013, 05:38:10 »

Amigo, ya no se usan tablas. Ahora lo único que tienes que usar son DIV
En línea
Boot
Senior
***

Karma:0
Desconectado Desconectado

Mensajes: 109


Living' easy, lovin' free


« Respuesta #5 : 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
En línea

Escribir un buen programa es como ir al baño. Si todo va bien, acabas en seguida, pero si la cosa se atasca...
Páginas: [1]
  Imprimir  
 
Ir a:  

Impulsado por MySQL Impulsado por PHP Powered by SMF 1.1.13 | SMF © 2006-2009, Simple Machines LLC

XHTML 1.0 válido! CSS válido! Dilber MC Theme by HarzeM