Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Felipe Baum

Quebra de Pagina

Recommended Posts

Bom dia,

 

Estou com o seguinte problema, quando busco algo no meu site retorna o resultado e as vezes fica maior que o mau layout, não sei oque fazer para meu layout acompanhar a tabela de resultado.

 

O site retorna com na imagem abaixo:

 

http://imageshack.us/photo/my-images/845/semttulotfp.jpg/

 

Abaixo esta o meu codigo:

 

<!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" lang="pt-br" xml:lang="pt-br">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Editora Eureka</title>
<style type="text/css">
#logo_top {
position: absolute;
width: 1024px;
height: 160px;
z-index: 1;
left: 173px;
background-color: #FF0000;
}
#corpo {
position: absolute;
width: 1024px;
height: 478px;
z-index: 2;
left: 173px;
top: 170px;
background-color: #CCCCCC;
font-weight: bold;
}
#apDiv1 {
position: absolute;
left: 172px;
top: 649px;
width: 1024px;
height: 36px;
z-index: 3;
}
#corpo table tr td p {
font-size: 36px;
}
#apDiv2 {
position: absolute;
left: 344px;
top: 240px;
width: 502px;
height: 135px;
z-index: 4;
}
#apDiv3 {
position: absolute;
left: 326px;
top: 228px;
width: 850px;
height: 160px;
z-index: 4;
}
#apDiv4 {
position: absolute;
left: 330px;
top: 225px;
width: 850px;
height: 214px;
z-index: 5;
}
</style>
</head>

 


<body>

<form action="biblioteca.php" method="POST">


<div id="logo_top"><img src="../Eureka.jpg" width="1024" height="160" alt="Logomarca Eureka" /></div>
<div id="corpo">
<p> </p>
<table width="157" height="203" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="149" height="69"><img src="../inicio.jpg" alt="Inicio" width="138" height="47" usemap="#Map" border="0" /></td>

<td width="10" rowspan="3" valign="top"><p> </p>
<p> </p></td>
</tr>

<tr>
<td height="78"><img src="../biblioteca.jpg" alt="biblioteca" width="136" height="47" usemap="#Map2" border="0" /></td>
</tr>
<tr>
<td height="62"><img src="../Contatos.jpg" alt="Contato" width="136" height="47" usemap="#Map3" border="0" /></td>
</tr>
</table>
</div>
<div id="apDiv1"><img src="../Barra.jpg" width="1024" height="41" alt="barra inferior" /></div>

<div id="apDiv2">

<td style="text-align:right;"><form name="busca"><input type="text" name="txtbusca" placeholder="Digite o livro a ser encontrado" size="35" required />
<button name="btnFind" type="submit" >Buscar</button></form></td>


<?php

$find=@$_REQUEST['txtbusca'];
if ($find <> '') {


$conexao = mysql_connect('localhost', 'root', '');

$db_selected = mysql_select_db('editora', $conexao);
$result = mysql_query("");

 

$result = "select * from tblivros a, tbautores b where a.nome_livro";
$result.=" like '%";
$result.="$find";
$result.="%' and a.id_autor = b.id or a.genero or a.resenha or b.nome_autor";
$result.=" like '%";
$result.="$find";
$result.="%' and a.id_autor = b.id;";


$query = mysql_query($result);
if(!$query) {
die(mysql_error()); // TODO: better error handling
}else{

// BGCOLOR=#7F7F7F
echo "<table width=100% cellpadding=0 cellspacing=0 border=1 bordercolor=#000000 style=border-collapse: collapse cellpadding=2><br>
<tr font face='Verdana' size='3'>
<th>Id</th>
<th>Id Autor</th>
<th>Nome Livro</th>
<th>Genero</th>
<th>Resenha</th>
<th>Capa</th>
<th>Nome Autor</th>
</tr>
<tr font face='Verdana' size='1'>";

 

while($row = mysql_fetch_array($query))
{
echo '<td>'.$row['id'];
echo '</td><td>'.$row['id_autor'];
echo '</td><td>'.$row['nome_livro'];
echo '</td><td>'.$row['genero'];
echo '</td><td>'.$row['resenha'];
echo '<td><img src='.$row['capa'];
echo ' alt= Capa do Livro width=100 height=120></td>';
echo '</td><td>'.$row['nome_autor'];
echo '</td></tr><tr>';
}
echo "</table>";
}
}
?>


<map name="Map" id="Map">
<area shape="rect" coords="4,5,133,44" href="../index.html" alt="Inicio " />
</map>

<map name="Map2" id="Map2">
<area shape="rect" coords="3,3,157,54" href="../class/biblioteca.php" alt="Biblioteca" />
</map>
<map name="Map3" id="Map3">
<area shape="rect" coords="4,6,130,42" href="../contato.html" alt="Contato" />
</map>
</body>
</html>



UP

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.