Formatting ASP results using Float and CSS

This is a discussion on "Formatting ASP results using Float and CSS" within the Classic ASP section. This forum, and the thread "Formatting ASP results using Float and CSS are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Sep 9th, 2007, 15:40
New Member
Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Formatting ASP results using Float and CSS

I’m trying to format my output from a MS Access database. I’m using ASP to retrieve the results from the database and CSS to format the output.

The results contain a thumbnail image that can be enlarged. I would like to alternate these results so that the image is on the right for result 1, left for result 2, right for 3 and so forth.

Currently I have the images all floated to the right. This works fine, however it’s not the desired result.

A preview can been seen at http://www.bigchetti.com/camelot/larin.asp
The formatting code is:

<div class="maincontent">
<%Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("Databases/camelot.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
SQL_query = "SELECT * FROM ProdCamelot WHERE ProdID >=0 AND ProdCategory = 'inflatable'"

Set RS = MyConn.Execute(SQL_query)

WHILE NOT RS.EOF
%>

<h3><%=RS("ProdNme")%></h3>
<a href="ProdImage/<%=RS("ProdImge")%>"><img border="0" src="ProdImage/<%=RS("ProdImge")%>" width="190" height="150" alt="" class="floatRight"></a>
<p><%=RS("ProdDsc")%></p>
<p>Price:<%response.write FormatCurrency(RS("ProdCost")) %></p>


<%
RS.MoveNext
WEND
%>


</div>


If anyone has any ideas your feedback would be appreciated.
Thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 10th, 2007, 09:42
New Member
Join Date: Sep 2007
Location: Australia
Age: 25
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Re: Formatting ASP results using Float and CSS

Problem has been solved. No need to add more divs. The problem was in the ASP code. I needed to add some variables, a counter and an IF ELSE statement.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 10th, 2007, 11:54
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Formatting ASP results using Float and CSS

Glad you sorted it out and thank you for posting the answer ... it may help someone else with the same problem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
asp, css, float, format

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
XML with CSS Formatting taemurz Web Page Design 11 Jun 23rd, 2007 21:57
text formatting questions Lchad Web Page Design 7 Jan 27th, 2007 23:05
XSL FO Table formatting davedran Other Programming Languages 0 Dec 13th, 2006 07:35
Problems with float:left float:right nvidiajoe Web Page Design 8 Nov 17th, 2006 20:24
Formatting not working masonbarge Webforumz Suggestions and Feedback 4 Jun 26th, 2006 14:41


All times are GMT. The time now is 22:02.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42