Ir para conteúdo
Fórum Script Brasil
  • 0

Problema com tabelas


Dark Phoenix

Pergunta

boa tarde galera

estou com um problema em que as outras páginas são impressas faltando a linha superior da tabela (a tabela fica aberta)

eu não consegui alguém poderia me ajudar?

código fonte:

<!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>Carros Usados</title>

<script LANGUAGE="JavaScript">

<!--

function centerWindow() {

if (document.all)

var xMax = screen.width, yMax = screen.height;

else

if (document.layers)

var xMax = window.outerWidth, yMax = window.outerHeight;

else

var xMax = 640, yMax=480;

var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;

window.open('imprimir_semi_novos.php?cidade=SJBV','windowbis',

'width=800,height=600,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');

}

//-->

</SCRIPT>

<style type="text/css">

<!--

.style1 {color: #FF0000}

-->

</style>

</head>

<body VLINK="blue">

<link rel="shortcut icon" href="favicon.ico" >

<a href="carros_semi_novos.php" title="Volta para a página anterior"><img src="imagens/icones/voltar.png" border="0" /></a><img src="imagens/icones/impressora.png"/ onclick="centerWindow()" style="cursor: pointer" title="Imprime esta página">

<br />

<table width="775" border="0" >

<tr>

<td width="170" height="57">

<div align="center"><strong><u>Empresa</u></strong>

</div>

</td>

<td colspan="6">

</td>

<td width="126" rowspan="2"><img src="imagens/logo.JPG" alt="Logo da Fiat" width="111" height="102" /></td>

</tr>

<tr>

<td>

<div align="center"><strong>Estoque de Semi-Novos</strong></div></td>

<td colspan="6"> <div align="center">12/11/2008</div></td>

</tr>

</table>

<table width="775" border="1" style="border-collapse: collapse">

<thead>

<tr>

<th colspan="1"><div align="center">Modelo, Versão e Série</div></th><th><div align="center">Portas</div></th><th><div align="center">Ano</div></th><th><div align="center">Cor</div></th><th><div align="center">Opicionais</div></th><th><div align="center">Combustível</div></th><th><div align="center">Status</div></th><th><div align="center">Valor</div></th><th><div align="center">Placa</div></th><th><div align="center">Local</div></th><th><div align="center">Vendedor</div></th>

</tr>

</thead>

<tbody>

<tr>

<th scope="col"><font face="Arial" size="1">

Palio</font></th>

<th scope="col"><font face="Arial" size="1">123132</font></th>

<th scope="col"><font face="Arial" size="1">12313</font></th>

<th scope="col"><font face="Arial" size="1">123132213</font></th>

<th scope="col"><font face="Arial" size="1">123213123</font></th>

<th scope="col"><font face="Arial" size="1">123123213</font></th>

<th scope="col"><font face="Arial" size="1">123213231</font></th>

<th scope="col"><font face="Arial" size="1">213.123,00</font></th>

<th scope="col"><font face="Arial" size="1">SJBV</font></th>

<th scope="col"><font face="Arial" size="1">SJBV</font></th>

<th scope="col"><font face="Arial" size="1">231123</font></th>

</tr>

</tbody>

</table>

</body>

</html>

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Para que nas impressões saia cabeçalho em todas as folhas você deve utilizar o elemento <thead>. Exemplo

<table width="300" border="0" cellspacing="0" cellpadding="0">
<thead>
  <tr>
    <th>Cabe&ccedil;alho</th>
    <th>Cabe&ccedil;alho</th>
    <th>Cabe&ccedil;alho</th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>Corpo</td>
    <td>Corpo</td>
    <td>Corpo</td>
  </tr>
  <tr>
    <td>Corpo</td>
    <td>Corpo</td>
    <td>Corpo</td>
  </tr>
  <tr>
    <td>Corpo</td>
    <td>Corpo</td>
    <td>Corpo</td>
  </tr>
<tbody>

<tfoot>
  <tr>
    <td>rodap&eacute;</td>
    <td>rodap&eacute;</td>
    <td>rodap&eacute;</td>
  </tr>
<tfoot>
</table>

O elemento <thead> define o cabeçalho de uma tabela, <tbody> o corpo da tabela (dados) e <tfoot> define o rodapé. Neste exemplo o cabeçalho e rodape irão repetir em todas as folhas de impressão menos o corpo.

Qualquer dúvida estou a disposição

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...