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

Duvida Urgente


ju_rezende

Pergunta

Ola pessoal fiz uma pagina onde o topo eu usei include, depois um tabela onde me mostra todos os campos de meu banco, como Empresa, endereço, bairro, cidade,telefone, site, email são no total 7 campos que estão em td.

O problema é o seguinte, quando é trago do banco essa informaçoes, existen alguns endereços grandes, então esta tabela fica com width maior que o topo,

seria possivel eu deixar o topo com o mesmo tamanho da tabela?

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Comercio de Jacareí</title>

</head>

<body style="color: #FF6600; border: 2px outset #FF6600">

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="30%" >

<td valign="top" colspan="3" width="100%" height="30%" ><!--#include file="../tulio/topo.html"--></td>

</tr>

</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="10%%">

<tr>

<td valign="top" colspan="3" bgcolor="#2165A5" width="100%" height ="5%" >

<!--#include file="../tulio/Pesquisa.asp"--></td>

</tr>

<tr>

<td valign="top" colspan="3" bgcolor="#2165A5" width="100%" height="5%">

<!--#include file="../tulio/rodape.html"--></td>

</tr>

</body>

</table>

<%

dim vcat

vcat= request.querystring("Categoria")

db = server.MapPath ("tulio\treino.mdb")

set con = server.CreateObject("adodb.connection")

set rs = server.CreateObject ("adodb.recordset")

sql = "select * from clientes where empresa = '" & request.querystring("empresa") & "' and del=0"

con.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & server.mappath("..\tulio\treino.mdb") &";Persist Security Info=False"

rs.Open sql,con,3,3

if rs.eof then %>

<p align=center>

<td width="100%"><font face="Arial Unicode MS" color="#2165A5" size="2"><%response.write "Nenhum registro encontrado"%></td></p><br><br><br>

<td width="100%"></font><font face="Arial" color="#2165A5" size="2"><p align =center><a href="PorNome.asp">

<font color="#2165A5">Voltar</font></a></font><font face="Arial Unicode MS" color="#2165A5" size="2"></td><% else

%>

<p align="center">

<font face="Arial Unicode MS" size="2" color="#2165A5">Total de registros: <%=rs.RecordCount%></font>

<BODY bgcolor="#FFFFCC">

<table bordercolor="#2165A5" border="1" width="100%"cellspacing="0" cellpadding="0" >

<tr>

<td bgcolor="#ffffcc" border=0 width="14%"> <font face="Arial Unicode MS" color="#2165A5"><b><i>Empresa</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%"> <font face="Arial Unicode MS" color="#2165A5"><b><i>Endereço</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%"> <font face="Arial Unicode MS" color="#2165A5"><b><i>Bairro</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%"> <font face="Arial Unicode MS" color="#2165A5"><b><i>Cidade</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%"> <font face="Arial Unicode MS" color="#2165A5"><b><i>Telefone</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%" > <font face="Arial Unicode MS" color="#2165A5"><b><i>Site</font></b></i></td>

<td bgcolor="#ffffcc" border=0 width="14%" > <b><i> <font face="Arial Unicode MS" color="#2165A5">E-mail</font></b></i></td>

</tr>

<%do while rs.eof=false %>

<%

If cor = "#FDD30E" Then

cor = "#ffffcc"

Else cor = "#FDD30E"

End If

%>

<tr bgcolor="<%=cor%>">

<td nowrap width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Empresa")%></font></td>

<td nowrap width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Endereco")%></font> </td>

<td nowrap width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Bairro")%></font> </td>

<td nowrapwidth="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%= rs("Cidade")%> </font> </td>

<td nowrap width="14%"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Telefone")%></font> </td>

<% if rs("site")<>"-" then%>

<td nowrap width="14%"><a href ="Http://<%=rs("site")%>"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Site")%></font> </td></a>

<%else%>

<td nowrap align=center width="14%"><a href="NaoSite.asp"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Site")%></font> </td></a>

<%end if%>

<td nowrap wi="14%" align="center"><font face="Arial Unicode MS" size="2" color="#2165A5"><%=rs("Email")%></font> </td>

</tr>

<%rs.MoveNext

loop%>

</TABLE>

<p align="center">

<br>

</font><font face="Arial" color="#2165A5" size="2"><a href="Loja.asp"><font color="#2165A5">Voltar</font></a><u> </u></p>

<%end if

con.close

set con=nothing%>

</table></html>

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
      152k
    • Posts
      651,8k
×
×
  • Criar Novo...