Print Page | Close Window

Needs Help with HTML Table on ASP Page

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=10368
Printed Date: 31 March 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Needs Help with HTML Table on ASP Page
Posted By: Misty
Subject: Needs Help with HTML Table on ASP Page
Date Posted: 10 May 2004 at 1:56am

I have created a photo gallery. I am frustrated by how the tables have turned out. I have tried different things, but I have been unable to get the tables to display the way I want them to. You can find this web page at http://www.hotelfloors.com/installations1.asp - http://www.hotelfloors.com/installations1.asp . I would like for the page to look like http://www.fastshutter.com/main - http://www.fastshutter.com/main . My photo gallery will only have two pictures per line. I would like for the boxes with the captions to be like http://www.fastshutter.com/main - http://www.fastshutter.com/main . Can someone please help me with this?

I am going to post parts of my code that are significant:

<table width="514" border="0" cellpadding="0" cellspacing="0">

        <!--DWLayoutTable-->

        <tr>

          <td width="66" height="105">&nbsp;</td>

          <td width="448" valign="top"><div align="left">

               <p><font color="#000000" size="5" face="Arial, Helvetica, sans-serif"><strong>Installations

                 Gallery </strong></font></p>

             </div>

             <div align="left">

<p>&nbsp;</p>

             </div>

             <div align="left">

            

             </div></td>

        </tr>

        <tr>

          <td height="38">&nbsp;</td>

          <td>&nbsp;</td>

        </tr>

        <%

       

      

      If rs.EOF then

     

    %>

        <tr>

          <td>&nbsp;</td>

          <td><font color="#330066" size="2" face="Arial, Helvetica, sans-serif"><strong>There

            are no pictures at this time!</strong></font></td>

        </tr>

        <tr>




Replies:
Posted By: dpyers
Date Posted: 10 May 2004 at 4:26am
What happens when you remove

          <td>&nbsp;</td>



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: ljamal
Date Posted: 10 May 2004 at 9:08am
The code below should point you in the right direction. I wrote it fast so it may not be totally correct, but should give you an idea.


<%
NumRecords = 0
Do while not rs.EOF
NumRecords = NumRecords + 1
if NumRecords mod 2 = 1 then
Response.Write "<tr><td width=""144""> </td>"
end if
%>
<td valign="top"><a href="ViewInstallation.asp?qryID=<%=rs("PicID")%>"> <img src=../images/<%= rs("thumbnail") %> border="0"></a></td>
<%
rs.MoveNext
if NumRecords mod 2 = 0 or rs.EOF then
Response.Write "</tr>"
rs.Move -(NumRecords mod 2)
Response.Write "<tr><td> </td>"
Response.Write "<td bgcolor=purple width=10 height=20"&_
"align=center"><font color=white size=2"&_
" face=""verdana, arial, helvetica, sans-serif""><b>"&_
rs("Details")&"</b></font></td>"
if NumRecords mod 2 = 0 then
rs.MoveNext
Response.Write "<td bgcolor=purple width=10 height=20"&_
"align=center"><font color=white size=2"&_
" face=""verdana, arial, helvetica, sans-serif""><b>"&_
rs("Details")&"</b></font></td>"
end if
rs.MoveNext
Response.Write "</tr>"
end if
Loop

%>

-------------
L. Jamal Walton

http://www.ljamal.com/" rel="nofollow - L. Jamal Inc : Web/ Print Design and ASP Programming


Posted By: BoLt
Date Posted: 10 May 2004 at 10:02am

Hi Misty, I like the photos

Place a link on my site http://www.kindways.co.uk/focalpoint.htm - www.kindways.co.uk/focalpoint.htm

If you like to your pics.



-------------
BoLt (Computer Engineer)
I suffer from Dyslexia, it means I can not spell to well not that I am thick.

www.welshlens.co.uk


Posted By: Misty
Date Posted: 10 May 2004 at 1:04pm

Originally posted by ljamal ljamal wrote:

The code below should point you in the right direction. I wrote it fast so it may not be totally correct, but should give you an idea.


<%
NumRecords = 0
Do while not rs.EOF
NumRecords = NumRecords + 1
if NumRecords mod 2 = 1 then
Response.Write "<tr><td width=""144""> </td>"
end if
%>
<td valign="top"><a href="ViewInstallation.asp?qryID=<%=rs("PicID")%>"> <img src=../images/<%= rs("thumbnail") %> border="0"></a></td>
<%
rs.MoveNext
if NumRecords mod 2 = 0 or rs.EOF then
Response.Write "</tr>"
rs.Move -(NumRecords mod 2)
Response.Write "<tr><td> </td>"
Response.Write "<td bgcolor=purple width=10 height=20"&_
"align=center"><font color=white size=2"&_
" face=""verdana, arial, helvetica, sans-serif""><b>"&_
rs("Details")&"</b></font></td>"
if NumRecords mod 2 = 0 then
rs.MoveNext
Response.Write "<td bgcolor=purple width=10 height=20"&_
"align=center"><font color=white size=2"&_
" face=""verdana, arial, helvetica, sans-serif""><b>"&_
rs("Details")&"</b></font></td>"
end if
rs.MoveNext
Response.Write "</tr>"
end if
Loop

%>

It looks like I am on the right track. Please look at the code that I have now. Please look at http://www.hotelfloors.com/installations3.asp - http://www.hotelfloors.com/installations3.asp . There is an error message so I have not successfully fixed this web page yet. There is a problem with the line of code that is bolded below:

    <%

       

        'Make sure that there are Specials

      If rs.EOF then

     

    %>

        <tr>

          <td>&nbsp;</td>

          <td><font color="#330066" size="2" face="Arial, Helvetica, sans-serif"><strong>There

             are no pictures at this time!</strong></font></td>

        </tr>

        <tr>

          <td>&nbsp;</td>

      

          <%

      end if 

          

If Not rs.EOF then       

Do While Not rs.EOF

  NumRecords = NumRecords + 1

  rs.MoveNext

 

 

Loop

rs.MoveFirst

Do While NOT rs.EOF %>

     <%

NumRecords = 0

Do while not rs.EOF



Posted By: Misty
Date Posted: 14 May 2004 at 9:54pm
I decided to develop the web page in ASP.Net. It was easier for me to develop the web page in ASP.net. You can find the web page at http://www.hotelfloors.com/installations.aspx - http://www.hotelfloors.com/installations.aspx . I am still interested in fixing the ASP page for a learning experience.


Posted By: zonelinks
Date Posted: 20 May 2004 at 2:11am
I have read u'r problem...i'll inform u if i could get a solution to this.........
------------------------
http://www.zonelinks.com
------------------------
The Power Link Dimension










Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net