Insertar imagenes en web
Hola: Tengo un problema al isertar imagenes, cuando las inserto en una tabla: Me queda un margen de aprox. 2 mm. debajo de la imagen, a pesar de poner hspace="0" y vspace="0".
Si la tabla tiene border="0" no se nota mucho, pero queda muy feo si la tabla tiene borde, y peor todavÃa si se unen varios <td> unos de los cuales tienen fondo con background="imagen" y los otros tienen imagenes, por ejemplo botones con enlaces.
¿Cómo puede quitarse ese espacio?
Si la tabla tiene border="0" no se nota mucho, pero queda muy feo si la tabla tiene borde, y peor todavÃa si se unen varios <td> unos de los cuales tienen fondo con background="imagen" y los otros tienen imagenes, por ejemplo botones con enlaces.
¿Cómo puede quitarse ese espacio?
Que raro.
¿Seguro que no estas poniendo ningun espacio entre imagenes?
¿Puedes darme la direccion para ver la pagina?
¿Seguro que no estas poniendo ningun espacio entre imagenes?
¿Puedes darme la direccion para ver la pagina?
No. No hay espacios. El mayor problema lo tengo en una barra de menús que quiero alternar entre <td background=\"fondo.jpg\"> + <td con imagen-enlace de menú>+ <td con imagen-enlace de menú> + <td background=\"fondo.jpg\"> por ejemplo, para formar una especie de tubo que vaya horizontal de lado a lado de la página. El problema es que se ven espacios entre <td> y <td> con el color de fondo.
La página todavia no la tengo subida al servidor, pero una de ellas es esta:
<html>
<head>
<title>Frame 1</title>
</head>
<body bgcolor=\"f49e09\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<TABLE border=\"0\" width=\"100%\"><TR><TD width=\"152\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"5\" colspan=\"2\"></td>
</tr>
<tr>
<td width=\"5\"></td>
<td valign=\"top\">
<img src=\"imagenes/logo.gif\" width=\"147\" height=\"79\" hspace=\"0\" vspace=\"0\" border=\"1\" alt=\"Logotipo\">
</td>
</tr>
</table>
</TD>
<TD align=\"center\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"1\"></td>
<tr>
<tr>
<td align=\"center\" valign=\"top\" colspan=\"6\">
<img src=\"imagenes/titulo.jpg\" whidth=\"416\" height=\"58\" hspace=\"0\" vspace=\"0\">
</td>
</tr>
<tr>
<td background=\"imagenes/fondo_menu.jpg\" width=\"50\" height=\"20\"></td>
<td background=\"imagenes/fondo_menu.jpg\" width=\"10\" height=\"20\"></td>
<td height=\"20\">
<a href=\"empresa.htm\"><img src=\"imagenes/i10.jpg\" border=\"0\" width=\"138\" height=\"20\"></a>
</td>
<td height=\"20\">
<a href=\"exposicion.htm\"><img src=\"imagenes/i20.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td height=\"20\">
<a href=\"contactar.htm\"><img src=\"imagenes/i30.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td background=\"imagenes/fondo_menu.jpg\" height=\"20\">
</td>
</tr>
</TD></TR> </TABLE>
</body>
</html>
La página todavia no la tengo subida al servidor, pero una de ellas es esta:
<html>
<head>
<title>Frame 1</title>
</head>
<body bgcolor=\"f49e09\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<TABLE border=\"0\" width=\"100%\"><TR><TD width=\"152\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"5\" colspan=\"2\"></td>
</tr>
<tr>
<td width=\"5\"></td>
<td valign=\"top\">
<img src=\"imagenes/logo.gif\" width=\"147\" height=\"79\" hspace=\"0\" vspace=\"0\" border=\"1\" alt=\"Logotipo\">
</td>
</tr>
</table>
</TD>
<TD align=\"center\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"1\"></td>
<tr>
<tr>
<td align=\"center\" valign=\"top\" colspan=\"6\">
<img src=\"imagenes/titulo.jpg\" whidth=\"416\" height=\"58\" hspace=\"0\" vspace=\"0\">
</td>
</tr>
<tr>
<td background=\"imagenes/fondo_menu.jpg\" width=\"50\" height=\"20\"></td>
<td background=\"imagenes/fondo_menu.jpg\" width=\"10\" height=\"20\"></td>
<td height=\"20\">
<a href=\"empresa.htm\"><img src=\"imagenes/i10.jpg\" border=\"0\" width=\"138\" height=\"20\"></a>
</td>
<td height=\"20\">
<a href=\"exposicion.htm\"><img src=\"imagenes/i20.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td height=\"20\">
<a href=\"contactar.htm\"><img src=\"imagenes/i30.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td background=\"imagenes/fondo_menu.jpg\" height=\"20\">
</td>
</tr>
</TD></TR> </TABLE>
</body>
</html>
He estudiado, asi por encima, tu codigo. Y estoy tan perplejo como tu. Creo que deberia funcionar.
Ahora no puedo seguir con ello, si puedo luego lo miro mas.
Pero te comento un par de cosas.
A la imagen "titulo.jpg" le tienes mal escrito el atributo "width".
No dejes retornos de carro entre las etiquetas td y la etiqueta img. Son tomados como un espacio. Quitalo y veras que el espacio inferior disminuye drasticamente.
Te aconsejo que apliques a la tabla de menu el estilo
border-collapse: collapse;
Tambien veras que el espacio entre celdas tambien disminuye.
Ahora no puedo seguir con ello, si puedo luego lo miro mas.
Pero te comento un par de cosas.
A la imagen "titulo.jpg" le tienes mal escrito el atributo "width".
No dejes retornos de carro entre las etiquetas td y la etiqueta img. Son tomados como un espacio. Quitalo y veras que el espacio inferior disminuye drasticamente.
Te aconsejo que apliques a la tabla de menu el estilo
border-collapse: collapse;
Tambien veras que el espacio entre celdas tambien disminuye.
Tienes razón Jorge. Aparte de los pequeños defectillos, como el width, he solucionado el problema que más me preocupaba colocando todas las imagenes dentro de un <td> y ya no aparecen los espacios entre ellas.
En cuanto a estos espacios entre <td> voy a probar quitando los retornos como me indicas.
Saludos y gracias.
En cuanto a estos espacios entre <td> voy a probar quitando los retornos como me indicas.
Saludos y gracias.
Gracias Jorge. Efectivamente el problema era el retorno del puto carro.
Ya me ha solucionado todos los problemas, tanto dentro de un solo <td> como varios <td> seguidos.
Saludos.
Ya me ha solucionado todos los problemas, tanto dentro de un solo <td> como varios <td> seguidos.
Saludos.
Ese efecto del retorno de carro, es poco conocido y te puede volver loco.
Me alegro de haber servido de ayuda.
Me alegro de haber servido de ayuda.
Ese efecto del retorno de carro, es poco conocido y te puede volver loco.
Me alegro de haber servido de ayuda.
No. No hay espacios. El mayor problema lo tengo en una barra de menús que quiero alternar entre <td background=\"fondo.jpg\"> + <td con imagen-enlace de menú>+ <td con imagen-enlace de menú> + <td background=\"fondo.jpg\"> por ejemplo, para formar una especie de tubo que vaya horizontal de lado a lado de la página. El problema es que se ven espacios entre <td> y <td> con el color de fondo.
La página todavia no la tengo subida al servidor, pero una de ellas es esta:
<html>
<head>
<title>Frame 1</title>
</head>
<body bgcolor=\"f49e09\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<TABLE border=\"0\" width=\"100%\"><TR><TD width=\"152\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"5\" colspan=\"2\"></td>
</tr>
<tr>
<td width=\"5\"></td>
<td valign=\"top\">
<img src=\"imagenes/logo.gif\" width=\"147\" height=\"79\" hspace=\"0\" vspace=\"0\" border=\"1\" alt=\"Logotipo\">
</td>
</tr>
</table>
</TD>
<TD align=\"center\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"1\"></td>
<tr>
<tr>
<td align=\"center\" valign=\"top\" colspan=\"6\">
<img src=\"imagenes/titulo.jpg\" whidth=\"416\" height=\"58\" hspace=\"0\" vspace=\"0\">
</td>
</tr>
<tr>
<td background=\"imagenes/fondo_menu.jpg\" width=\"50\" height=\"20\"></td>
<td background=\"imagenes/fondo_menu.jpg\" width=\"10\" height=\"20\"></td>
<td height=\"20\">
<a href=\"empresa.htm\"><img src=\"imagenes/i10.jpg\" border=\"0\" width=\"138\" height=\"20\"></a>
</td>
<td height=\"20\">
<a href=\"exposicion.htm\"><img src=\"imagenes/i20.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td height=\"20\">
<a href=\"contactar.htm\"><img src=\"imagenes/i30.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td background=\"imagenes/fondo_menu.jpg\" height=\"20\">
</td>
</tr>
</TD></TR> </TABLE>
</body>
</html>
La página todavia no la tengo subida al servidor, pero una de ellas es esta:
<html>
<head>
<title>Frame 1</title>
</head>
<body bgcolor=\"f49e09\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<TABLE border=\"0\" width=\"100%\"><TR><TD width=\"152\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"5\" colspan=\"2\"></td>
</tr>
<tr>
<td width=\"5\"></td>
<td valign=\"top\">
<img src=\"imagenes/logo.gif\" width=\"147\" height=\"79\" hspace=\"0\" vspace=\"0\" border=\"1\" alt=\"Logotipo\">
</td>
</tr>
</table>
</TD>
<TD align=\"center\" valign=\"top\">
<table border=\"0\" leftmargin=\"0\" topmargin=\"0\" rightmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">
<tr>
<td height=\"1\"></td>
<tr>
<tr>
<td align=\"center\" valign=\"top\" colspan=\"6\">
<img src=\"imagenes/titulo.jpg\" whidth=\"416\" height=\"58\" hspace=\"0\" vspace=\"0\">
</td>
</tr>
<tr>
<td background=\"imagenes/fondo_menu.jpg\" width=\"50\" height=\"20\"></td>
<td background=\"imagenes/fondo_menu.jpg\" width=\"10\" height=\"20\"></td>
<td height=\"20\">
<a href=\"empresa.htm\"><img src=\"imagenes/i10.jpg\" border=\"0\" width=\"138\" height=\"20\"></a>
</td>
<td height=\"20\">
<a href=\"exposicion.htm\"><img src=\"imagenes/i20.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td height=\"20\">
<a href=\"contactar.htm\"><img src=\"imagenes/i30.jpg\" border=\"0\" width=\"138\" height=\"20\" hspace=\"0\" vspace=\"0\"></a>
</td>
<td background=\"imagenes/fondo_menu.jpg\" height=\"20\">
</td>
</tr>
</TD></TR> </TABLE>
</body>
</html>
