Jump to content
Fórum Script Brasil
  • 0

Duvida Urgente


ju_rezende

Question

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 to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 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 to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152k
    • Total Posts
      651.5k
×
×
  • Create New...