Foros del Web » Creando para Internet » CSS »

Padding entre tablas?

Estas en el tema de Padding entre tablas? en el foro de CSS en Foros del Web. Hola gente, estoy haciendo una web con tablas y no puedo darle padding a una tabla.. Por eje: Código: 1 -<table width=200px> <tr> <td> contenido> ...
  #1 (permalink)  
Antiguo 14/10/2009, 15:11
 
Fecha de Ingreso: octubre-2008
Mensajes: 22
Antigüedad: 15 años, 6 meses
Puntos: 0
Padding entre tablas?

Hola gente, estoy haciendo una web con tablas y no puedo darle padding a una tabla..
Por eje:

Código:
1-<table width=200px>
<tr>
<td> contenido>
</tr>
2-<table class="tdbody" width=200px>
<tr>
<td> contenido>
</tr>
Yo a la tabla 2 le puse
Código css:
Ver original
  1. .tdbody{
  2. background-color:#202020;
  3. padding-top:20px;}

pero no pasa nada
  #2 (permalink)  
Antiguo 14/10/2009, 16:44
Avatar de deirdre  
Fecha de Ingreso: mayo-2009
Mensajes: 690
Antigüedad: 14 años, 11 meses
Puntos: 45
Respuesta: Padding entre tablas?

No entiendo bien lo que haces ni lo que quieres hacer, porque en tu código tienes varios errores. Prueba esto:

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tabla + tabla</title>
<style type="text/css">
.tdbody {
	background-color: #202020;
	margin-top: 20px; /*cambia  padding por margin */
}
</style>
</head>

<body>
<table width="200px">
	<tr>
		<td>contenido</td> <!--aquí falta el cierre de td-->
	</tr>
</table> <!--aquí falta el cierre de table-->

<table class="tdbody" width=200px>
	<tr>
		<td>contenido</td> <!--aquí falta el cierre de td-->
	</tr>
</table> <!--aquí falta el cierre de table-->

</body>

</html> 
Si no es esto, pon tu código arreglado y pregunta lo que quieres obtener.

Bye
  #3 (permalink)  
Antiguo 15/10/2009, 12:06
Avatar de cristian_cena
Colaborador
 
Fecha de Ingreso: junio-2009
Mensajes: 2.244
Antigüedad: 14 años, 10 meses
Puntos: 269
Respuesta: Padding entre tablas?

Así funciona el asunto, pruébalo:

En head:
<style>
table tr td {padding:/*valor en px, em, etc. ej: 10px*/;}
</style>


En body:
<table>
<tr>
<td>contenido</td>
</tr>
</table>



Saludos!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:58.