Foros del Web » Creando para Internet » HTML »

Problemas con los saltos de página

Estas en el tema de Problemas con los saltos de página en el foro de HTML en Foros del Web. Hola tengo el siguiente código: <?php session_start(); ?> <!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=iso-8859-1" /> <title>HOJA ...
  #1 (permalink)  
Antiguo 04/11/2007, 05:46
 
Fecha de Ingreso: marzo-2007
Mensajes: 69
Antigüedad: 17 años, 1 mes
Puntos: 0
Problemas con los saltos de página

Hola tengo el siguiente código:

<?php
session_start();
?>
<!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=iso-8859-1" />
<title>HOJA DE VIDA DOCENTES</title>
<link href="../Master/Estilos.css" rel="stylesheet" type="text/css" />
<link rel="STYLESHEET" type="text/css" href="../includes/boletin_imprimir.css" media="print">
<style type="text/css">
<!--
.Estilo1 {
font-size: 16px;
font-weight: bold;
}
.Estilo2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
.Estilo3 {font-family: Arial, Helvetica, sans-serif}
.Estilo10 {font-size: 14px; }
.Estilo11 {font-size: 24px; font-family: Arial, Helvetica, sans-serif;}
-->
</style>
<script>
function imprimir()
{
window.print()
}
</script>
</head><body>
<?php
include '../includes/conexion2.php';
$sql="SELECT DI_Nombre, DI_NIT, DI_DANE, DI_Dir, DI_Tel, CONCAT(DI_Ciudad,'-',DI_Dpto) AS Ciudad FROM datosinst WHERE DI_Id='1';";
$result=mysql_db_query($_SESSION['base_datos'], $sql, $conexion)
or die("Error al consultar datos");
$row=mysql_fetch_array($result);
$nombre=$row['DI_Nombre'];
$nit=$row['DI_NIT'];
$dane=$row['DI_DANE'];
$dir = $row['DI_Dir'];
$tel = $row['DI_Tel'];
$ciudad=$row['Ciudad'];
mysql_free_result($result);
$docente = $_POST['opcion'];
for($i=0;$i<count($docente);$i++)
{
?>
<table width="713" border="0" align="center" class="BORDE_TABLAS">
<tr>
<td colspan="3"><div align="center">
<p>&nbsp;</p>
<p><span class="Estilo1"><span class="Estilo3"><br />
<?=$nombre?>
</span></span><br />
<span class="Estilo2">NIT:
<?=$nit?>
- DANE:
<?=$dane?>
</span><br />
<span class="Estilo2">DIRECCIÓN:
<?=$dir?>
- TELÉFONO:
<?=$tel?>
<BR />
<?=$ciudad?>
</span></p>
</div></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
<td colspan="3"><div align="center" class="Estilo11">HOJA DE VIDA DOCENTE </div></td>
</tr>
<tr>
<td colspan="3"><p>&nbsp;</p>
<p>&nbsp;</p></td>
</tr>
<tr>
<?php
$sql="SELECT DP_TipoID, DP_Identificacion, CONCAT(DP_Nombre1,' ',DP_Nombre2) AS Nombres, CONCAT(DP_Apellido1,' ',DP_Apellido2) AS Apellidos, DP_LugarExp, DP_CiudadNac, DP_FechaNac, DP_Direccion, DP_Telefono, DP_Genero FROM datospersonales WHERE DP_Identificacion='".$docente[$i]."';";
$result=mysql_db_query($_SESSION['base_datos'], $sql, $conexion)
or die("Error al consultar datos.");
$row=mysql_fetch_array($result);
?>
<td><div align="left" class="Estilo10"><span class="Estilo3">Tipo de Identificaci&oacute;n </span></div></td>
<td><div align="left">:</div></td>
<td width="445"><div align="left" class="Estilo2">
<?=$row['DP_TipoID']?>
</div></td>
</tr>
<tr>
<td width="209"><div align="left" class="Estilo10"><span class="Estilo3">N&uacute;mero de Identificaci&oacute;n </span></div></td>
<td width="43"><div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_Identificacion']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Ciudad de Expedici&oacute;n </div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_LugarExp']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Nombres</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['Nombres']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Apellidos</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['Apellidos']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Fecha de Nacimiento </div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_FechaNac']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">
<div align="left">Ciudad de Nacimiento </div>
</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_CiudadNac']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Edad</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?php
$dia=date('j');
$mes=date('n');
$ano=date('Y');
list($dianaz, $mesnaz, $anonaz) = split( '[/.-]', $row['DP_FechaNac']);
if(strlen($anonaz)==2){$anonaz=$anonaz+1900;}
if (($mesnaz == $mes) && ($dianaz > $dia)){$ano=($ano-1);}
if ($mesnaz > $mes) {$ano=($ano-1);}
echo $ano-$anonaz.' AÑOS';
?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Genero</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?php $row['DP_Genero']=='M'?$genero='MASCULINO':$genero='FEMENINO'; echo $genero?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Direcci&oacute;n</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_Direccion']?>
</div></td>
</tr>
<tr>
<td><div align="left" class="Estilo2">Tel&eacute;fono</div></td>
<td>
<div align="left">:</div></td>
<td><div align="left" class="Estilo2">
<?=$row['DP_Telefono']?>
</div></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>

<td colspan="3"><div align="center" class="Estilo3">
<p><strong>ASIGNATURAS IMPARTIDAS EN LA INSTITUCI&Oacute;N </strong></p>
<table width="491" border="0" class="BORDE_TABLAS">
<tr>
<td width="267" bgcolor="#F1F1F1"><div align="center" class="Estilo10"><strong>ASIGNATURA</strong></div></td>
<td width="154" bgcolor="#F1F1F1"><div align="center" class="Estilo10"><strong>CURSO</strong></div></td>
<td width="48" bgcolor="#F1F1F1"><div align="center" class="Estilo10"><strong>IH</strong></div></td>
</tr>
<?PHP
mysql_free_result($result);
$sql="SELECT As_Asig, D_Curso, D_Inthor FROM asignatura, docente_".$_POST['anyo']." WHERE As_Cod=D_Asig AND D_Cedula='".$docente[$i]."';";
$result=mysql_db_query($_SESSION['base_datos'], $sql, $conexion)
or die("Error al consultar datos.");
while($row=mysql_fetch_array($result))
{
?>
<tr>
<td><?=$row['As_Asig']?></td>
<td><?=$row['D_Curso']?></td>
<td><?=$row['D_Inthor']?></td>
</tr>
<?php
}
?>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div></td>
</tr>
</table>
<div style="page-break-after:always"></div>
<?php
}
?><div id="btn_imprimir" align="center"><input type="button" name="Submit" value="Imprimir" onclick="imprimir();"/></div>
</body>
</html>

Pero al momento de hechar un vistazo preliminar e imprimir no me hace el salto d página, imprime una atras de la otra.

Que puede estar pasando?

Gracias
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 19:59.