Olá, eu tenho um mural de recados em minha página, o que eu gostaria de fazer é o seguinte:
O meu mural exibe sempre 12 mensagens, todas uma abaixo da outra; eu quero fazer com que estas mensagens sejam exibidas em 3 colunas de mesmo tamanho, ou seja, quero fazer com que as mensagens que aparecem na horizontal, fiquem contendo 3 colunas na vertical. Abaixo estou postando uma parte do meu código que realiza a postagem de quem está enviando, para quem e a mensagem, então como posso fazer com que ao apresentar a mensagem, ele me mostre em colunas?
<% 'For....Next Loop to display records from the guestbook database
For intRecordLoopCounter = 1 to intRecordsPerPage
'If there are no guestbook records left to display then exit loop
If rsCommon.EOF Then Exit For
'Read in the values form the database
strName = rsCommon("Name")
strPara = rsCommon("Para")
dtmEntryDate = CDate(rsCommon("Date_stamp"))
strComments = rsCommon("Comments")
'Write the HTML to the web browser to display the guestbook entries
%> <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="<% = strTableBorderColour %>">
<tr>
<td> <table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr bgcolor="<% = strTableTitleColour %>">
<td colspan="2" class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="27%" class="text"><font color="#FFFF00"><b>De:</b></font> <% Response.Write(strName)%>
<td width="20%" class="text"><font color="#ffff00"><b>Para:</b></font> <% Response.Write(strPara) %></td>
<td width="80%" align="right" class="text"><font color="#ffff00"><b>Enviado:</b></font> <% = FormatDateTime(dtmEntryDate, VbLongDate) %> às <% = FormatDateTime(dtmEntryDate, VbShortTime) %></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" bgcolor="<% = strTableColour %>" class="text"><font color="#000000"><% = strComments %></font> </td>
</tr>
<tr bgcolor="<% = strTableTitleColour %>">
<td width="50%" align="left" class="text"><font color="#ffff00"><b>Cidade:</b></font> <% = strCountry %></td>
<td width="50%" align="right" class="text"><font color="#ffff00"><b>E-mail:</b></font> <% Response.Write("<a href=""mailto:" & strEmailAddress & """>" & strEmailAddress & "</a>") %></td>
</tr>
</table></td>
</tr>
</table>
<br> <%
'Move to the next record in the database
rsCommon.MoveNext
'Loop back round
Next
End If
'Display an HTML table with links to the other entries in the guestbook
%> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td> <table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="50%" align="center" class="text"> <%
'If there are more pages to display then add a title to the other pages
If intRecordPositionPageNum > 1 or NOT rsCommon.EOF Then
Response.Write vbCrLf & " Page: "
End If
'If the guestbook page number is higher than page 1 then display a back link
If intRecordPositionPageNum > 1 Then
Response.Write vbCrLf & ("<a href=""default.asp?PagePosition=" & intRecordPositionPageNum - 1 & """ target=""_self""><< Anterior</a>")
End If
'If there are more pages to display then display links to all the pages
If intRecordPositionPageNum > 1 or NOT rsCommon.EOF Then
'Display a link for each page in the guestbook
For intLinkPageNum = 1 to intTotalNumGuestbookPages
'If there is more than 7 pages display ... last page and exit the loop
If intLinkPageNum > 15 Then
If intTotalNumGuestbookPages = intRecordPositionPageNum Then Response.Write(" ..." & intTotalNumGuestbookPages) Else Response.Write(" ...<a href=""default.asp?PagePosition=" & intTotalNumGuestbookPages & """ target=""_self"">" & intTotalNumGuestbookPages & "</a>")
'Exit Loop
Exit For
'Else display the normal link code
Else
'If the page to be linked to is the page displayed then don't make it a hyper-link
If intLinkPageNum = intRecordPositionPageNum Then Response.Write(" " & intLinkPageNum) Else Response.Write(" <a href=""default.asp?PagePosition=" & intLinkPageNum & """ target=""_self"">" & intLinkPageNum & "</a>")
End If
Next
End If
'If it is Not the End of the guestbook entries then display a next link for the next guestbook page
If NOT rsCommon.EOF then
Response.Write (" <a href=""default.asp?PagePosition=" & intRecordPositionPageNum + 1 & """ target=""_self"">Próxima >></a>")
End If
'Finsh HTML the table
%>
Pergunta
Mateustg
Olá, eu tenho um mural de recados em minha página, o que eu gostaria de fazer é o seguinte:
O meu mural exibe sempre 12 mensagens, todas uma abaixo da outra; eu quero fazer com que estas mensagens sejam exibidas em 3 colunas de mesmo tamanho, ou seja, quero fazer com que as mensagens que aparecem na horizontal, fiquem contendo 3 colunas na vertical. Abaixo estou postando uma parte do meu código que realiza a postagem de quem está enviando, para quem e a mensagem, então como posso fazer com que ao apresentar a mensagem, ele me mostre em colunas?
<% 'For....Next Loop to display records from the guestbook database For intRecordLoopCounter = 1 to intRecordsPerPage 'If there are no guestbook records left to display then exit loop If rsCommon.EOF Then Exit For 'Read in the values form the database strName = rsCommon("Name") strPara = rsCommon("Para") dtmEntryDate = CDate(rsCommon("Date_stamp")) strComments = rsCommon("Comments") 'Write the HTML to the web browser to display the guestbook entries %> <table width="100%" border="0" cellspacing="0" cellpadding="1" align="center" bgcolor="<% = strTableBorderColour %>"> <tr> <td> <table width="100%" border="0" cellpadding="2" cellspacing="0"> <tr bgcolor="<% = strTableTitleColour %>"> <td colspan="2" class="text"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="27%" class="text"><font color="#FFFF00"><b>De:</b></font> <% Response.Write(strName)%> <td width="20%" class="text"><font color="#ffff00"><b>Para:</b></font> <% Response.Write(strPara) %></td> <td width="80%" align="right" class="text"><font color="#ffff00"><b>Enviado:</b></font> <% = FormatDateTime(dtmEntryDate, VbLongDate) %> às <% = FormatDateTime(dtmEntryDate, VbShortTime) %></td> </tr> </table></td> </tr> <tr> <td colspan="2" bgcolor="<% = strTableColour %>" class="text"><font color="#000000"><% = strComments %></font> </td> </tr> <tr bgcolor="<% = strTableTitleColour %>"> <td width="50%" align="left" class="text"><font color="#ffff00"><b>Cidade:</b></font> <% = strCountry %></td> <td width="50%" align="right" class="text"><font color="#ffff00"><b>E-mail:</b></font> <% Response.Write("<a href=""mailto:" & strEmailAddress & """>" & strEmailAddress & "</a>") %></td> </tr> </table></td> </tr> </table> <br> <% 'Move to the next record in the database rsCommon.MoveNext 'Loop back round Next End If 'Display an HTML table with links to the other entries in the guestbook %> <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="50%" align="center" class="text"> <% 'If there are more pages to display then add a title to the other pages If intRecordPositionPageNum > 1 or NOT rsCommon.EOF Then Response.Write vbCrLf & " Page: " End If 'If the guestbook page number is higher than page 1 then display a back link If intRecordPositionPageNum > 1 Then Response.Write vbCrLf & ("<a href=""default.asp?PagePosition=" & intRecordPositionPageNum - 1 & """ target=""_self""><< Anterior</a>") End If 'If there are more pages to display then display links to all the pages If intRecordPositionPageNum > 1 or NOT rsCommon.EOF Then 'Display a link for each page in the guestbook For intLinkPageNum = 1 to intTotalNumGuestbookPages 'If there is more than 7 pages display ... last page and exit the loop If intLinkPageNum > 15 Then If intTotalNumGuestbookPages = intRecordPositionPageNum Then Response.Write(" ..." & intTotalNumGuestbookPages) Else Response.Write(" ...<a href=""default.asp?PagePosition=" & intTotalNumGuestbookPages & """ target=""_self"">" & intTotalNumGuestbookPages & "</a>") 'Exit Loop Exit For 'Else display the normal link code Else 'If the page to be linked to is the page displayed then don't make it a hyper-link If intLinkPageNum = intRecordPositionPageNum Then Response.Write(" " & intLinkPageNum) Else Response.Write(" <a href=""default.asp?PagePosition=" & intLinkPageNum & """ target=""_self"">" & intLinkPageNum & "</a>") End If Next End If 'If it is Not the End of the guestbook entries then display a next link for the next guestbook page If NOT rsCommon.EOF then Response.Write (" <a href=""default.asp?PagePosition=" & intRecordPositionPageNum + 1 & """ target=""_self"">Próxima >></a>") End If 'Finsh HTML the table %>Link para o comentário
Compartilhar em outros sites
4 respostass a esta questão
Posts Recomendados
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.