Ir para conteúdo

POWERED BY:

Arquivado

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

biduca

Repeat

Recommended Posts

Gostaria de uma ajuda de todos! Possu um sistema de noticias, onde o "repeat" de prévia de noticias está jogando as noticias na vertical da página. Gostaria de fazer com q as noticias ficassem na horizontal... ou seja lado a lado... naum uma embaixo a outra.... vou postar aki o código para vc6 olharem:

 

<%@LANGUAGE="VBSCRIPT"%><!--#include file="Connections/conSurf.asp" --><%Dim RsNotDim RsNot_numRowsSet RsNot = Server.CreateObject("ADODB.Recordset")RsNot.ActiveConnection = MM_conSurf_STRINGRsNot.Source = "SELECT * FROM noticias ORDER BY CodNoticia DESC"RsNot.CursorType = 0RsNot.CursorLocation = 2RsNot.LockType = 1RsNot.Open()RsNot_numRows = 0Dim Repeat1__numRowsDim Repeat1__indexRepeat1__numRows = 2Repeat1__index = 1RsNot_numRows = RsNot_numRows + Repeat1__numRows%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><body scroll="no"><br><table width="100%" border="0" cellpadding="0" cellspacing="0">  <tr>    <% While ((Repeat1__numRows <> 0) AND (NOT RsNot.EOF)) %>    <td height="80" valign="middle"><div style="width:490px;margin-left:5px;margin-top:5px;margin-right:5px;"> <a href="mostra_noticia.asp?CodNot=<%=(RsNot.Fields.Item("CodNoticia").Value)%>"><img src="fotos/<%=(RsNot.Fields.Item("foto").Value)%>" alt="<%=(RsNot.Fields.Item("titulo").Value)%>" width="100" height="70" hspace="5" align="left" class="brd">   </a><a href="mostra_noticia.asp?CodNot=<%=(RsNot.Fields.Item("CodNoticia").Value)%>"><span class="tit"><strong>      </strong></span></a>        <table width="100%"  cellspacing="3" cellpadding="3">          <tr>            <td class="brd2"><span class="tit"><strong><%=(RsNot.Fields.Item("titulo").Value)%></strong></span></td>          </tr>        </table>        <a href="mostra_noticia.asp?CodNot=<%=(RsNot.Fields.Item("CodNoticia").Value)%>"><span class="tit">        </span><span class="font"><%=(RsNot.Fields.Item("resumo").Value)%></span></a></div></td>  </tr>  <tr>    <td height="7" valign="top"></td>  </tr>  <%   Repeat1__index=Repeat1__index+4  Repeat1__numRows=Repeat1__numRows-1  RsNot.MoveNext()Wend%></table> <span class="data"></span></body></html>

Desde já um muito obrigado a todos!!!!!!!!!!!!!!!!!

Compartilhar este post


Link para o post
Compartilhar em outros sites

em vez de mandar repetir as linhas da tabela manda repetir as colunas...

Compartilhar este post


Link para o post
Compartilhar em outros sites

e também faz um IF, para se der o derminado número de colunas q você quer, ele quebrar a linhaex. If i = 5 then response.write "</tr>" - para se caso você quiser 5 colunas

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.